Deleted Added
full compact
vnode.h (70834) vnode.h (71576)
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 70834 2001-01-09 04:33:49Z wollman $
34 * $FreeBSD: head/sys/sys/vnode.h 71576 2001-01-24 12:35:55Z jasone $
35 */
36
37#ifndef _SYS_VNODE_H_
38#define _SYS_VNODE_H_
39
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/queue.h>

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

73 */
74TAILQ_HEAD(buflists, buf);
75
76typedef int vop_t __P((void *));
77struct namecache;
78
79/*
80 * Reading or writing any of these items requires holding the appropriate lock.
35 */
36
37#ifndef _SYS_VNODE_H_
38#define _SYS_VNODE_H_
39
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/queue.h>

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

73 */
74TAILQ_HEAD(buflists, buf);
75
76typedef int vop_t __P((void *));
77struct namecache;
78
79/*
80 * Reading or writing any of these items requires holding the appropriate lock.
81 * v_freelist is locked by the global vnode_free_list simple lock.
82 * v_mntvnodes is locked by the global mntvnodes simple lock.
81 * v_freelist is locked by the global vnode_free_list mutex.
82 * v_mntvnodes is locked by the global mntvnodes mutex.
83 * v_flag, v_usecount, v_holdcount and v_writecount are
84 * locked by the v_interlock mutex.
85 * v_pollinfo is locked by the lock contained inside it.
86 */
87struct vnode {
88 u_long v_flag; /* vnode flags (see below) */
89 int v_usecount; /* reference count of users */
90 int v_writecount; /* reference count of writers */

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

119 struct lock *v_vnlock; /* pointer to vnode lock */
120 enum vtagtype v_tag; /* type of underlying data */
121 void *v_data; /* private data for fs */
122 LIST_HEAD(, namecache) v_cache_src; /* Cache entries from us */
123 TAILQ_HEAD(, namecache) v_cache_dst; /* Cache entries to us */
124 struct vnode *v_dd; /* .. vnode */
125 u_long v_ddid; /* .. capability identifier */
126 struct {
83 * v_flag, v_usecount, v_holdcount and v_writecount are
84 * locked by the v_interlock mutex.
85 * v_pollinfo is locked by the lock contained inside it.
86 */
87struct vnode {
88 u_long v_flag; /* vnode flags (see below) */
89 int v_usecount; /* reference count of users */
90 int v_writecount; /* reference count of writers */

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

119 struct lock *v_vnlock; /* pointer to vnode lock */
120 enum vtagtype v_tag; /* type of underlying data */
121 void *v_data; /* private data for fs */
122 LIST_HEAD(, namecache) v_cache_src; /* Cache entries from us */
123 TAILQ_HEAD(, namecache) v_cache_dst; /* Cache entries to us */
124 struct vnode *v_dd; /* .. vnode */
125 u_long v_ddid; /* .. capability identifier */
126 struct {
127 struct simplelock vpi_lock; /* lock to protect below */
127 struct mtx vpi_lock; /* lock to protect below */
128 struct selinfo vpi_selinfo; /* identity of poller(s) */
129 short vpi_events; /* what they are looking for */
130 short vpi_revents; /* what has happened */
131 } v_pollinfo;
132 struct proc *v_vxproc; /* proc owning VXLOCK */
133#ifdef DEBUG_LOCKS
134 const char *filename; /* Source file doing locking */
135 int line; /* Line number doing locking */

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

364/*
365 * A list of all the operation descs.
366 */
367extern struct vnodeop_desc *vnodeop_descs[];
368
369/*
370 * Interlock for scanning list of vnodes attached to a mountpoint
371 */
128 struct selinfo vpi_selinfo; /* identity of poller(s) */
129 short vpi_events; /* what they are looking for */
130 short vpi_revents; /* what has happened */
131 } v_pollinfo;
132 struct proc *v_vxproc; /* proc owning VXLOCK */
133#ifdef DEBUG_LOCKS
134 const char *filename; /* Source file doing locking */
135 int line; /* Line number doing locking */

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

364/*
365 * A list of all the operation descs.
366 */
367extern struct vnodeop_desc *vnodeop_descs[];
368
369/*
370 * Interlock for scanning list of vnodes attached to a mountpoint
371 */
372extern struct simplelock mntvnode_slock;
372extern struct mtx mntvnode_mtx;
373
374/*
375 * This macro is very helpful in defining those offsets in the vdesc struct.
376 *
377 * This is stolen from X11R4. I ignored all the fancy stuff for
378 * Crays, so if you decide to port this to such a serious machine,
379 * you might want to consult Intrinsic.h's XtOffset{,Of,To}.
380 */

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

571void vgonel __P((struct vnode *vp, struct proc *p));
572void vhold __P((struct vnode *));
573int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred,
574
575 struct proc *p, int slpflag, int slptimeo));
576int vtruncbuf __P((struct vnode *vp, struct ucred *cred, struct proc *p,
577 off_t length, int blksize));
578void vprint __P((char *label, struct vnode *vp));
373
374/*
375 * This macro is very helpful in defining those offsets in the vdesc struct.
376 *
377 * This is stolen from X11R4. I ignored all the fancy stuff for
378 * Crays, so if you decide to port this to such a serious machine,
379 * you might want to consult Intrinsic.h's XtOffset{,Of,To}.
380 */

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

571void vgonel __P((struct vnode *vp, struct proc *p));
572void vhold __P((struct vnode *));
573int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred,
574
575 struct proc *p, int slpflag, int slptimeo));
576int vtruncbuf __P((struct vnode *vp, struct ucred *cred, struct proc *p,
577 off_t length, int blksize));
578void vprint __P((char *label, struct vnode *vp));
579int vrecycle __P((struct vnode *vp, struct simplelock *inter_lkp,
579int vrecycle __P((struct vnode *vp, struct mtx *inter_lkp,
580 struct proc *p));
581int vn_close __P((struct vnode *vp,
582 int flags, struct ucred *cred, struct proc *p));
583void vn_finished_write __P((struct mount *mp));
584int vn_isdisk __P((struct vnode *vp, int *errp));
585int vn_lock __P((struct vnode *vp, int flags, struct proc *p));
586#ifdef DEBUG_LOCKS
587int debug_vn_lock __P((struct vnode *vp, int flags, struct proc *p,

--- 66 unchanged lines hidden ---
580 struct proc *p));
581int vn_close __P((struct vnode *vp,
582 int flags, struct ucred *cred, struct proc *p));
583void vn_finished_write __P((struct mount *mp));
584int vn_isdisk __P((struct vnode *vp, int *errp));
585int vn_lock __P((struct vnode *vp, int flags, struct proc *p));
586#ifdef DEBUG_LOCKS
587int debug_vn_lock __P((struct vnode *vp, int flags, struct proc *p,

--- 66 unchanged lines hidden ---