Deleted Added
full compact
vnode.h (103187) vnode.h (103314)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vnode.h 8.7 (Berkeley) 2/4/94
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vnode.h 8.7 (Berkeley) 2/4/94
34 * $FreeBSD: head/sys/sys/vnode.h 103187 2002-09-10 13:48:21Z bde $
34 * $FreeBSD: head/sys/sys/vnode.h 103314 2002-09-14 09:02:28Z njl $
35 */
36
37#ifndef _SYS_VNODE_H_
38#define _SYS_VNODE_H_
39
40/*
41 * XXX - compatability until lockmgr() goes away or all the #includes are
42 * updated.

--- 17 unchanged lines hidden (view full) ---

60 */
61
62/*
63 * Vnode types. VNON means no type.
64 */
65enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
66
67/*
35 */
36
37#ifndef _SYS_VNODE_H_
38#define _SYS_VNODE_H_
39
40/*
41 * XXX - compatability until lockmgr() goes away or all the #includes are
42 * updated.

--- 17 unchanged lines hidden (view full) ---

60 */
61
62/*
63 * Vnode types. VNON means no type.
64 */
65enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
66
67/*
68 * Vnode tag types.
69 * These are for the benefit of external programs only (e.g., pstat)
70 * and should NEVER be inspected by the kernel.
71 */
72enum vtagtype {
73 VT_NON, VT_UFS, VT_NFS, VT_UNUSED, VT_PC, VT_LFS, VT_LOFS, VT_FDESC,
74 VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
75 VT_UNION, VT_MSDOSFS, VT_DEVFS, VT_TFS, VT_VFS, VT_CODA, VT_NTFS,
76 VT_HPFS, VT_NWFS, VT_PSEUDOFS, VT_SMBFS, VT_UDF
77};
78
79/*
80 * Each underlying filesystem allocates its own private area and hangs
81 * it from v_data. If non-null, this area is freed in getnewvnode().
82 */
83TAILQ_HEAD(buflists, buf);
84
85typedef int vop_t(void *);
86struct namecache;
87

--- 49 unchanged lines hidden (view full) ---

137 } v_un;
138 daddr_t v_lastw; /* last write (write cluster) */
139 daddr_t v_cstart; /* start block of cluster */
140 daddr_t v_lasta; /* last allocation (cluster) */
141 int v_clen; /* length of current cluster */
142 struct vm_object *v_object; /* Place to store VM object */
143 struct lock v_lock; /* used if fs don't have one */
144 struct lock *v_vnlock; /* pointer to vnode lock */
68 * Each underlying filesystem allocates its own private area and hangs
69 * it from v_data. If non-null, this area is freed in getnewvnode().
70 */
71TAILQ_HEAD(buflists, buf);
72
73typedef int vop_t(void *);
74struct namecache;
75

--- 49 unchanged lines hidden (view full) ---

125 } v_un;
126 daddr_t v_lastw; /* last write (write cluster) */
127 daddr_t v_cstart; /* start block of cluster */
128 daddr_t v_lasta; /* last allocation (cluster) */
129 int v_clen; /* length of current cluster */
130 struct vm_object *v_object; /* Place to store VM object */
131 struct lock v_lock; /* used if fs don't have one */
132 struct lock *v_vnlock; /* pointer to vnode lock */
145 enum vtagtype v_tag; /* type of underlying data */
133 const char *v_tag; /* type of underlying data */
146 void *v_data; /* private data for fs */
147 LIST_HEAD(, namecache) v_cache_src; /* Cache entries from us */
148 TAILQ_HEAD(, namecache) v_cache_dst; /* Cache entries to us */
149 struct vnode *v_dd; /* .. vnode */
150 u_long v_ddid; /* .. capability identifier */
151 struct vpollinfo *v_pollinfo; /* p Poll events */
152 struct label v_label; /* MAC label for vnode */
153#ifdef DEBUG_LOCKS

--- 76 unchanged lines hidden (view full) ---

230#define VV_ROOT 0x0001 /* root of its filesystem */
231#define VV_ISTTY 0x0002 /* vnode represents a tty */
232#define VV_NOSYNC 0x0004 /* unlinked, stop syncing */
233#define VV_OBJBUF 0x0008 /* Allocate buffers in VM object */
234#define VV_CACHEDLABEL 0x0010 /* Vnode has valid cached MAC label */
235#define VV_TEXT 0x0020 /* vnode is a pure text prototype */
236#define VV_COPYONWRITE 0x0040 /* vnode is doing copy-on-write */
237#define VV_SYSTEM 0x0080 /* vnode being used by kernel */
134 void *v_data; /* private data for fs */
135 LIST_HEAD(, namecache) v_cache_src; /* Cache entries from us */
136 TAILQ_HEAD(, namecache) v_cache_dst; /* Cache entries to us */
137 struct vnode *v_dd; /* .. vnode */
138 u_long v_ddid; /* .. capability identifier */
139 struct vpollinfo *v_pollinfo; /* p Poll events */
140 struct label v_label; /* MAC label for vnode */
141#ifdef DEBUG_LOCKS

--- 76 unchanged lines hidden (view full) ---

218#define VV_ROOT 0x0001 /* root of its filesystem */
219#define VV_ISTTY 0x0002 /* vnode represents a tty */
220#define VV_NOSYNC 0x0004 /* unlinked, stop syncing */
221#define VV_OBJBUF 0x0008 /* Allocate buffers in VM object */
222#define VV_CACHEDLABEL 0x0010 /* Vnode has valid cached MAC label */
223#define VV_TEXT 0x0020 /* vnode is a pure text prototype */
224#define VV_COPYONWRITE 0x0040 /* vnode is doing copy-on-write */
225#define VV_SYSTEM 0x0080 /* vnode being used by kernel */
226#define VV_PROCDEP 0x0100 /* vnode is process dependent */
238
239/*
240 * Vnode attributes. A field value of VNOVAL represents a field whose value
241 * is unavailable (getattr) or which is not to be changed (setattr).
242 */
243struct vattr {
244 enum vtype va_type; /* vnode type (for create) */
245 u_short va_mode; /* files access mode and type */

--- 442 unchanged lines hidden (view full) ---

688 struct componentname *cnp);
689int cache_lookup(struct vnode *dvp, struct vnode **vpp,
690 struct componentname *cnp);
691void cache_purge(struct vnode *vp);
692void cache_purgevfs(struct mount *mp);
693int cache_leaf_test(struct vnode *vp);
694void cvtstat(struct stat *st, struct ostat *ost);
695void cvtnstat(struct stat *sb, struct nstat *nsb);
227
228/*
229 * Vnode attributes. A field value of VNOVAL represents a field whose value
230 * is unavailable (getattr) or which is not to be changed (setattr).
231 */
232struct vattr {
233 enum vtype va_type; /* vnode type (for create) */
234 u_short va_mode; /* files access mode and type */

--- 442 unchanged lines hidden (view full) ---

677 struct componentname *cnp);
678int cache_lookup(struct vnode *dvp, struct vnode **vpp,
679 struct componentname *cnp);
680void cache_purge(struct vnode *vp);
681void cache_purgevfs(struct mount *mp);
682int cache_leaf_test(struct vnode *vp);
683void cvtstat(struct stat *st, struct ostat *ost);
684void cvtnstat(struct stat *sb, struct nstat *nsb);
696int getnewvnode(enum vtagtype tag,
697 struct mount *mp, vop_t **vops, struct vnode **vpp);
685int getnewvnode(const char *tag, struct mount *mp, vop_t **vops,
686 struct vnode **vpp);
698int lease_check(struct vop_lease_args *ap);
699int spec_vnoperate(struct vop_generic_args *);
700int speedup_syncer(void);
701#define textvp_fullpath(p, rb, rfb) \
702 vn_fullpath(FIRST_THREAD_IN_PROC(p), (p)->p_textvp, rb, rfb)
703int vn_fullpath(struct thread *td, struct vnode *vn,
704 char **retbuf, char **freebuf);
705int vaccess(enum vtype type, mode_t file_mode, uid_t uid, gid_t gid,

--- 106 unchanged lines hidden ---
687int lease_check(struct vop_lease_args *ap);
688int spec_vnoperate(struct vop_generic_args *);
689int speedup_syncer(void);
690#define textvp_fullpath(p, rb, rfb) \
691 vn_fullpath(FIRST_THREAD_IN_PROC(p), (p)->p_textvp, rb, rfb)
692int vn_fullpath(struct thread *td, struct vnode *vn,
693 char **retbuf, char **freebuf);
694int vaccess(enum vtype type, mode_t file_mode, uid_t uid, gid_t gid,

--- 106 unchanged lines hidden ---