Home | History | Annotate | Download | only in kern
History log of /src/sys/kern/vnode_if.sh
RevisionDateAuthorComments
 1.77  26-Oct-2022  riastradh miscfs/deadfs/deadfs.h: New home for deadfs-related externs.

XXX regen sys/kern/vnode_if.c and the others
 1.76  18-Jul-2022  thorpej Make kqueue event status for vnodes shareable, and for stacked file systems
like nullfs, make the upper vnode share that status with the lower vnode.

And, lo, NetBSD 9.99.99.

Fixes PR kern/56713.
 1.75  03-May-2022  hannken Really depend the lockdebug checks on option VNODE_LOCKDEBUG -- were
enabled by accident.
 1.74  03-May-2022  hannken Make option VNODE_LOCKDEBUG more functional.

- Add "LOCKED=EXCL" option for vnode operations needing exclusive locked nodes.

- As it is impossible to check for shared locks held by current thread avoid
false assertions by testing for exclusive lock only in the "LOCKED=NO" case.

- New option "RUMP_VNODE_LOCKDEBUG" enables VNODE_LOCKDEBUG for the rump kernel.
 1.73  19-Mar-2022  hannken Remove now unused VV_LOCKSWORK, all file systems support locking.

Remove unused predicates vn_locked() and vn_anylocked().

Welcome to 9.99.95
 1.72  20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.71  12-Aug-2021  andvar s/beween/between/
 1.70  16-May-2020  christos Add ACL support for FFS. From FreeBSD.
 1.69  23-Feb-2020  ad Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
more cache-conscious way. With that done, go back to adjusting v_usecount
with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.
 1.68  01-Dec-2019  ad branches: 1.68.2;
Minor vnode locking changes:

- Stop using atomics to maniupulate v_usecount. It was a mistake to begin
with. It doesn't work as intended unless the XLOCK bit is incorporated in
v_usecount and we don't have that any more. When I introduced this 10+
years ago it was to reduce pressure on v_interlock but it doesn't do that,
it just makes stuff disappear from lockstat output and introduces problems
elsewhere. We could do atomic usecounts on vnodes but there has to be a
well thought out scheme.

- Resurrect LK_UPGRADE/LK_DOWNGRADE which will be needed to work effectively
when there is increased use of shared locks on vnodes.

- Allocate the vnode lock using rw_obj_alloc() to reduce false sharing of
struct vnode.

- Put all of the LRU lists into a single cache line, and do not requeue a
vnode if it's already on the correct list and was requeued recently (less
than a second ago).

Kernel build before and after:

119.63s real 1453.16s user 2742.57s system
115.29s real 1401.52s user 2690.94s system
 1.67  11-Oct-2019  hannken As VOP_STRATEGY() usually calls itself on the file system holding "/dev"
it may deadlock on suspension of this file system.

Add fstrans type LAZY and use it for VOP_STRATEGY().

Adress PR kern/53624 (dom0 freeze on domU exit) is still there
 1.66  04-Jun-2017  hannken branches: 1.66.6; 1.66.10;
Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.
 1.65  04-Jun-2017  hannken Add "FSTRANS=LOCK" and "FSTRANS=UNLOCK" to vop_lock and vop_unlock.

Add two "static inline" functions to vnode_if.c to handle MPSAFE
and FSTRANS before and after the "VCALL()".

Take FSTRANS and handle error before "VCALL(...vop_lock...)" and
release it after "VCALL(...vop_unlock...)".
 1.64  16-Apr-2017  riastradh branches: 1.64.4;
Count vnode arguments correctly.

Don't count arguments that have WILLRELE/WILLPUT; count arguments
that are struct vnode *.

No functional change currently because it happens that every released
or put vnode argument comes first or after other ones.
 1.63  11-Apr-2017  riastradh Eliminate now-unused WILLUNLOCK vop flag.
 1.62  22-Feb-2017  hannken Prepare to move fstrans into vnode_if.c, allow "FSTRANS=YES"
and "FSTRANS=NO" in the vop description.
Add fstrans_start()/fstrans_done() to all vops that have FSTRANS=YES
or have the first vnode unlocked.
 1.61  26-Jan-2016  pooka branches: 1.61.2; 1.61.4;
"rump_private.h" -> <rump-sys/kern.h>
 1.60  13-Jan-2014  hannken branches: 1.60.6;
Support for vnode operation versioning. Allow a new keyword "VERSION"
in the description so "VERSION 2" will change the name of the argument
from vop_XXX_args to vop_XXX_v2_args.
 1.59  17-Jul-2013  pooka Additionally translate daddr_t to int64_t in the rumpvnode interface.
The type daddr_t is not available for all systems (e.g. Linux systems with
musl libc), and exposing it will just cause an unnecessary compilation
failure even if the type is not used.
 1.58  11-Jul-2011  hannken branches: 1.58.2; 1.58.12; 1.58.16; 1.58.24;
Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do. Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
 1.57  03-Apr-2011  rmind - Use offsetof() in VOPARG_OFFSETOF() instead of re-implementing it.
- Remove VDESC_NOMAP_VPP and VDESC_VPP_WILLRELE.
- Remove VRELEL_NOINACTIVE and VRELEL_ONHEAD.
 1.56  14-Apr-2010  pooka branches: 1.56.2;
Make rump vnode interface lightweight: the only things we
really need are:

0) provide VOP_OP in the alternate RUMP_VOP_OP namespace

and for each op:
1) schedule rump cpu
2) call VOP_OP
3) unschedule rump cpu

While here, take the opportunity to get rid of _t lossage in the
rump-exported interfaces.
 1.55  14-Apr-2010  pooka Print "end of special cases" only where special cases end and not
a second time at the end of the file. Adjust whitespace for the
sheer functional joy of it.

(i hope i didn't ruin someone's joke by missing a humorous implication
that all vnode operations are considered a little special)
 1.54  10-Apr-2010  pooka "Not yet" since 4.4BSD is quite a lot of "not yet", so remove
vdesc_transports from vnodeop_desc until we have a "not not yet"
situation.

Ride 5.99.27 bump (full build still in progress. i wanted to get
this in as soon as possible to most effectively ride the bump.)
 1.53  15-Oct-2009  pooka branches: 1.53.2; 1.53.4;
Generate scheduling points around rump vnode operations.
 1.52  29-Sep-2009  pooka Add a switch on whether to create VNODE_LOCKDEBUG checks or not.
Since VNODE_LOCKDEBUG has never been generally useful, default to
off. However, the checks can still be generated by flipping the
switch for the isolated cases where this form of dynamic analysis
is useful and the person using it knows what she is doing.
 1.51  19-Nov-2008  pooka Split vfs out of rumpkern into rumpvfs. Non-fs rumps no longer
include the file system code. File system rumps explicitly need
to include rumpvfs from now on.
 1.50  17-Nov-2008  pooka Make this generate the rump vnode interface files.
 1.49  19-May-2008  ad branches: 1.49.4; 1.49.6;
Reduce ifdefs due to MULTIPROCESSOR slightly.
 1.48  02-Jan-2008  ad branches: 1.48.6; 1.48.8; 1.48.10; 1.48.12;
Merge vmlocking2 to head.
 1.47  26-Nov-2007  pooka branches: 1.47.2; 1.47.6;
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
 1.46  06-Nov-2007  ad Merge from vmlocking.
 1.45  10-Oct-2007  ad branches: 1.45.2; 1.45.4;
Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
 1.44  22-Jul-2007  pooka branches: 1.44.4; 1.44.6; 1.44.8; 1.44.10;
Introduce WILLMAKE for vnode operations which create a new vnode.
Insert a KASSERT along the return path of such operations to check
that the operation set the vnode size.
 1.43  30-Nov-2006  pooka branches: 1.43.8; 1.43.18;
Generate preprocessor macros for vop offsets in vfs op descs. And
use these symbols in the desc structures instead of magic numbers.
No functional change, except VOP_FOO_DESCOFFSET macros in vnode_if.h.

wrstuden ok
 1.42  14-May-2006  elad branches: 1.42.8; 1.42.10;
integrate kauth.
 1.41  11-Dec-2005  christos branches: 1.41.4; 1.41.6; 1.41.8; 1.41.10; 1.41.12;
merge ktrace-lwp.
 1.40  07-Dec-2005  thorpej Generate ANSI function decls.
 1.39  07-Dec-2005  thorpej Remove the VNODE_OP_NOINLINE option. We now NEVER inline vnode ops.
Briefly discussed on tech-kern not too long ago.
 1.38  26-Feb-2005  perry branches: 1.38.4;
remove some trailing spaces in generated output when removing $s from $NetBSD$
 1.37  26-Feb-2005  perry Change the DO NOT EDIT warning slightly, including the text "DO NOT EDIT".
(It is nice if all files that should not be edited have DO NOT EDIT in them.)
 1.36  26-Feb-2005  perry nuke trailing whitespace
 1.35  21-Sep-2004  thorpej branches: 1.35.4; 1.35.6;
Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made. Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP. Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
set. Some file systems (e.g. specfs) don't even bother with vnode
locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
vnode locking problems, not the least of which is the "use SHARED for
VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.
 1.34  25-Jan-2004  hannken Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.
 1.33  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32  29-Jun-2003  fvdl branches: 1.32.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.31  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.30  12-Nov-2001  lukem add RCSID to generated .c file
 1.29  07-May-2001  lukem branches: 1.29.2; 1.29.6;
delint: vop_default_desc was declared const but not defined const.
 1.28  22-Jan-2001  jdolecek branches: 1.28.2;
when generating individual *_desc, generate also proper offsets so that
then don't need to be patched at runtime
add new define VNODE_OPS_COUNT (to vnode_if.h) so that the number is known
at compile-time
make stuff const, it now can be
 1.27  19-Jan-2001  martin Remove over-const-ification.
This structures are actually modified at kernel init time by vfs_op_init.

XXX - looks like the state after initialization is pretty const and with
some magic in the generator script (and appropriate changes to vfs_op_init)
it could be made const.
 1.26  18-Jan-2001  jdolecek constify
 1.25  22-Dec-2000  fvdl Make that defined(LKM) || defined(_LKM), to catch both the cases
of compiling a kernel with LKM support and compiling an LKM.
 1.24  22-Dec-2000  fvdl LKM -> _LKM around opt_ include.
 1.23  22-Dec-2000  mrg redo the previous correctly
 1.22  22-Dec-2000  mrg avoid redefinition of VNODE_OP_NOINLINE
 1.21  13-Sep-2000  thorpej If building an LKM, always cause it to use the non-inline version
of the vnode ops, and if LKM support is included in the kernel,
always include the non-inline stubs regardless of whether or not
they're being used in the static kernel iamge.
 1.20  13-Sep-2000  thorpej Allow the VOP_*() calls to be un-inlined with the VNODE_OP_NOINLINE
kernel option. Saves 36k of kernel text on an i386 GENERIC. Useful
for install media kernels, small memory systems, embedded systems.
 1.19  07-Jul-1999  wrstuden branches: 1.19.2;
Update syntax to support WILLUNLOCK and WILLPUT syntax. Change calls which
really vput to indicate that rather than just WILLRELE.
 1.18  13-Sep-1998  christos branches: 1.18.8;
Quote the backquotes in the double-quoted shell string, otherwise they
disappear and you get AS IS'' instead of ``AS IS'' in the generated files.
 1.17  30-Jul-1998  mycroft branches: 1.17.2;
__Namespace__ __protection__.
 1.16  01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.15  09-Jan-1998  thorpej Add RCS IDs to generated files, in correct place.
 1.14  08-Jan-1998  thorpej Back out RCS ID related changes.
 1.13  05-Jan-1998  perry fix RCS ids insertion so it really works
 1.12  05-Jan-1998  perry make script insert RCS ids into generated files
 1.11  07-Jul-1997  cgd mark prototypes for static inline functions in the generated files as
possibly unused (with __attribute__ ((unused))), to avoid generating
warnings when compiling without optimization but with most ports' default
warning flags.
 1.10  22-Jan-1997  mikel add multiple inclusion protection to generated header
 1.9  29-Feb-1996  cgd Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them. From PR 2142, OK'd
by mycroft.
 1.8  10-Mar-1995  chopps add prototypes before each inline
 1.7  25-Aug-1994  cgd gwr's slightly cleaner way to do that last...
 1.6  11-Aug-1994  cgd make output a bit cleaner, to satisfy mckusick.
 1.5  15-Jul-1994  cgd don't use inline, use __inline, like cdefs intends (so it can kill it if nongcc
 1.4  29-Jun-1994  cgd branches: 1.4.2;
New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.3  15-Jun-1994  gwr Get rid if 'set -f' (at Adam's request). It is unnecessary,
and not supported by sh on some systems (i.e. Ultrix).
 1.2  15-Jun-1994  gwr No longer requires GNU awk (plain "nawk" is OK).
New AWK parser is simpler and makes better use of arrays.
 1.1  08-Jun-1994  mycroft branches: 1.1.1;
Update to 4.4-Lite fs code.
 1.1.1.2  01-Mar-1998  fvdl Import 4.4BSD-Lite2
 1.1.1.1  01-Mar-1998  fvdl Import 4.4BSD-Lite for reference
 1.4.2.3  29-Aug-1994  mycroft update from trunk
 1.4.2.2  11-Aug-1994  mycroft update from trunk
 1.4.2.1  15-Jul-1994  cgd updates from trunk. basically, C language errors.
 1.17.2.2  30-Jul-1998  mycroft __Namespace__ __protection__.
 1.17.2.1  30-Jul-1998  mycroft file vnode_if.sh was added on branch eeh-paddr_t on 1998-07-30 00:46:02 +0000
 1.18.8.1  02-Aug-1999  thorpej Update from trunk.
 1.19.2.3  11-Feb-2001  bouyer Sync with HEAD.
 1.19.2.2  05-Jan-2001  bouyer Sync with HEAD
 1.19.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.28.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.28.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.29.6.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.29.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.2.7  11-Dec-2005  christos Sync with head.
 1.32.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.32.2.5  24-Sep-2004  skrll Sync with HEAD.
 1.32.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.32.2.2  03-Aug-2004  skrll Sync with HEAD
 1.32.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.35.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.35.4.1  29-Apr-2005  kent sync with -current
 1.38.4.7  21-Jan-2008  yamt sync with head
 1.38.4.6  07-Dec-2007  yamt sync with head
 1.38.4.5  15-Nov-2007  yamt sync with head.
 1.38.4.4  27-Oct-2007  yamt sync with head.
 1.38.4.3  03-Sep-2007  yamt sync with head.
 1.38.4.2  30-Dec-2006  yamt sync with head.
 1.38.4.1  21-Jun-2006  yamt sync with head.
 1.41.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.41.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.41.8.1  24-May-2006  yamt sync with head.
 1.41.6.1  01-Jun-2006  kardel Sync with head.
 1.41.4.1  09-Sep-2006  rpaulo sync with head
 1.42.10.1  10-Dec-2006  yamt sync with head.
 1.42.8.1  12-Jan-2007  ad Sync with head.
 1.43.18.1  15-Aug-2007  skrll Sync with HEAD.
 1.43.8.4  21-Aug-2007  ad Add a per-mount flag that specifies whether the underlying file system code
is MP safe, and populate a per-vnode flag from this at vnode creation time.
If the file system is MP safe, do not acquire kernel_lock in the VOP wrappers.
 1.43.8.3  20-Aug-2007  ad Sync with HEAD.
 1.43.8.2  17-Jun-2007  ad - Increase the number of thread priorities from 128 to 256. How the space
is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
is provided, with hooks for fast-path MD code that can run the interrupt
threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.
 1.43.8.1  21-Mar-2007  ad Acquire the kernel lock in the VOP_* wrappers and the socket ops.
 1.44.10.2  22-Jul-2007  pooka Introduce WILLMAKE for vnode operations which create a new vnode.
Insert a KASSERT along the return path of such operations to check
that the operation set the vnode size.
 1.44.10.1  22-Jul-2007  pooka file vnode_if.sh was added on branch matt-mips64 on 2007-07-22 21:26:54 +0000
 1.44.8.1  14-Oct-2007  yamt sync with head.
 1.44.6.3  09-Jan-2008  matt sync with HEAD
 1.44.6.2  08-Nov-2007  matt sync with -HEAD
 1.44.6.1  06-Nov-2007  matt sync with HEAD
 1.44.4.3  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.44.4.2  11-Nov-2007  joerg Sync with HEAD.
 1.44.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.45.4.3  18-Feb-2008  mjf Sync with HEAD.
 1.45.4.2  08-Dec-2007  mjf Sync with HEAD.
 1.45.4.1  19-Nov-2007  mjf Sync with HEAD.
 1.45.2.1  13-Nov-2007  bouyer Sync with HEAD
 1.47.6.1  02-Jan-2008  bouyer Sync with HEAD
 1.47.2.1  28-Dec-2007  ad Make rump build.
 1.48.12.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.48.10.3  11-Aug-2010  yamt sync with head.
 1.48.10.2  11-Mar-2010  yamt sync with head
 1.48.10.1  04-May-2009  yamt sync with head.
 1.48.8.1  04-Jun-2008  yamt sync with head
 1.48.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.48.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.49.6.1  19-Jan-2009  skrll Sync with HEAD.
 1.49.4.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.53.4.2  21-Apr-2011  rmind sync with head
 1.53.4.1  30-May-2010  rmind sync with head
 1.53.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.56.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.58.24.1  23-Jul-2013  riastradh sync with HEAD
 1.58.16.2  18-May-2014  rmind sync with head
 1.58.16.1  28-Aug-2013  rmind sync with head
 1.58.12.2  03-Dec-2017  jdolecek update from HEAD
 1.58.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.58.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.60.6.2  28-Aug-2017  skrll Sync with HEAD
 1.60.6.1  19-Mar-2016  skrll Sync with HEAD
 1.61.4.1  21-Apr-2017  bouyer Sync with HEAD
 1.61.2.2  26-Apr-2017  pgoyette Sync with HEAD
 1.61.2.1  20-Mar-2017  pgoyette Sync with HEAD
 1.64.4.2  14-Oct-2019  martin Pull up following revision(s) (requested by hannken in ticket #1405):

sys/kern/vnode_if.sh: revision 1.67
sys/kern/vnode_if.src: revision 1.78

As VOP_STRATEGY() usually calls itself on the file system holding "/dev"
it may deadlock on suspension of this file system.

Add fstrans type LAZY and use it for VOP_STRATEGY().

Adress PR kern/53624 (dom0 freeze on domU exit) is still there
 1.64.4.1  04-Jun-2017  bouyer pullup the following revisions, requested by hannken in ticket #2:
src/share/man/man9/fstrans.9 1.25
src/sys/kern/vfs_mount.c 1.66
src/sys/kern/vfs_subr.c 1.468
src/sys/kern/vfs_trans.c 1.46
src/sys/kern/vfs_vnode.c 1.94, 1.95, 1.96
src/sys/kern/vnode_if.c 1.105, 1.106
src/sys/kern/vnode_if.sh 1.65, 1.66
src/sys/kern/vnode_if.src 1.76
src/sys/miscfs/genfs/genfs_io.c 1.69
src/sys/miscfs/genfs/genfs_vnops.c 1.196, 1.197
src/sys/miscfs/genfs/layer_extern.h 1.40
src/sys/miscfs/genfs/layer_vfsops.c 1.51
src/sys/miscfs/genfs/layer_vnops.c 1.67
src/sys/miscfs/nullfs/null_vnops.c 1.42
src/sys/miscfs/overlay/overlay_vnops.c 1.24
src/sys/miscfs/umapfs/umap_vnops.c 1.60
src/sys/rump/include/rump/rumpvnode_if.h 1.29, 1.30
src/sys/rump/librump/rumpkern/emul.c 1.182
src/sys/rump/librump/rumpvfs/rumpvnode_if.c 1.29, 1.30
src/sys/sys/fstrans.h 1.11
src/sys/sys/vnode.h 1.278
src/sys/sys/vnode_if.h 1.100, 1.101
src/sys/sys/vnode_impl.h 1.14, 1.15
src/sys/ufs/lfs/lfs_pages.c 1.12

Vnode state, lock and fstrans cleanup:
- Rename vnode state "VS_ACTIVE" to "VS_LOADED" and add synthetic
state "VS_ACTIVE" to assert a loaded vnode with usecount > 0.

- Redo FSTRANS in vnode_if.c and use it for VOP_LOCK and VOP_UNLOCK.

- Cleanup the genfs lock operations.

- Make "struct vnode_impl" member "vi_lock" a krwlock_t again.

- Remove the lock type argument from fstrans_start and
fstrans_start_nowait,
remove now unused FSTRANS state "FSTRANS_SUSPENDING".
 1.66.10.1  15-Oct-2019  martin Pull up following revision(s) (requested by hannken in ticket #307):

sys/kern/vnode_if.sh: revision 1.67
sys/kern/vnode_if.src: revision 1.78

As VOP_STRATEGY() usually calls itself on the file system holding "/dev"
it may deadlock on suspension of this file system.

Add fstrans type LAZY and use it for VOP_STRATEGY().

Adress PR kern/53624 (dom0 freeze on domU exit) is still there
 1.66.6.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.66.6.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.68.2.2  29-Feb-2020  ad Sync with head.
 1.68.2.1  18-Jan-2020  ad Allow VOP_LOCK(LK_NONE).

RSS XML Feed