DragonFly BSD

CVS log for src/sys/vfs/gnu/ext2fs/ext2_vnops.c

[BACK] Up to [DragonFly] / src / sys / vfs / gnu / ext2fs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu Jun 19 23:27:39 2008 UTC (6 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +1 -1 lines
Miscellanious performance adjustments to the kernel

* Add an argument to VOP_BMAP so VFSs can discern the type of operation
  the BMAP is being done for.

* Normalize the variable name denoting the blocksize to 'blksize' in
  vfs_cluster.c.

* Fix a bug in the cluster code where a stale bp->b_error could wind up
  getting returned when B_ERROR is not set.

* Do not B_AGE cluster bufs.

* Pass the block size to both cluster_read() and cluster_write() instead
  of those routines getting the block size from
  vp->v_mount->mnt_stat.f_iosize.  This allows different areas of a file
  to use a different block size.

* Properly initialize bp->b_bio2.bio_offset to doffset in cluster_read().
  This fixes an issue where VFSs were making an extra, unnecessary call
  to BMAP.

* Do not recycle vnodes on the free list until numvnodes has reached
  desiredvnodes.  Vnodes were being recycled when their resident page count
  had dropped to zero, but this is actually too early as the VFS may cache
  important information in the vnode that would otherwise require a number
  of I/O's to re-acquire.  This mainly helps HAMMER (whos inode lookups are
  fairly expensive).

* Do not VAGE vnodes.

* Remove the minvnodes test.  There is no reason not to load the vnode cache
  all the way through to its max.

* buf_cmd_t visibility for the new BMAP argument.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Aug 28 01:04:32 2007 UTC (6 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +1 -15 lines
Add vop_stdgetpages() and vop_stdputpages() and replace those filesystem
getpages and putpages routines which were doing the same thing.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Aug 13 17:31:56 2007 UTC (6 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +1 -1 lines
Remove the vpp (returned underlying device vnode) argument from VOP_BMAP().
VOP_BMAP() may now only be used to determine linearity and clusterability of
the blocks underlying a filesystem object.  The meaning of the returned
block number (other then being contiguous as a means of indicating
linearity or clusterability) is now up to the VFS.

This removes visibility into the device(s) underlying a filesystem from
the rest of the kernel.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Aug 8 00:12:51 2007 UTC (6 years, 11 months ago) by swildner
Branches: MAIN
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +2 -1 lines
Adjust some comments with reality.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed May 9 00:53:35 2007 UTC (7 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +11 -5 lines
Give the device major / minor numbers their own separate 32 bit fields
in the kernel.  Change dev_ops to use a RB tree to index major device
numbers and remove the 256 device major number limitation.

Build a dynamic major number assignment feature into dev_ops_add() and
adjust ASR (which already had a hand-rolled one), and MFS to use the
feature.  MFS at least does not require any filesystem visibility to
access its backing device.  Major devices numbers >= 256 are used for
dynamic assignment.

Retain filesystem compatibility for device numbers that fall within the
range that can be represented in UFS or struct stat (which is a single
32 bit field supporting 8 bit major numbers and 24 bit minor numbers).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun May 6 19:23:33 2007 UTC (7 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +4 -4 lines
Use SYSREF to reference count struct vnode.  v_usecount is now
v_sysref(.refcnt).  v_holdcnt is now v_auxrefs.  SYSREF's termination state
(using a negative reference count from -0x40000000+) now places the vnode in
a VCACHED or VFREE state and deactivates it.  The vnode is now assigned a
64 bit unique id via SYSREF.

vhold() (which manipulates v_auxrefs) no longer reactivates a vnode and
is explicitly used only to track references from auxillary structures
and references to prevent premature destruction of the vnode.  vdrop()
will now only move a vnode from VCACHED to VFREE on the 1->0 transition
of v_auxrefs if the vnode is in a termination state.

vref() will now panic if used on a vnode in a termination state.  vget()
must now be used to explicitly reactivate a vnode.  These requirements
existed before but are now explicitly asserted.

vlrureclaim() and allocvnode() should now interact a bit better.  In
particular, vlrureclaim() will do a better job of finding vnodes to flush
and transition from VCACHED to VFREE, and allocvnode() will do a better
job finding vnodes to reuse without getting blocked by a flush.

allocvnode now uses a real VX lock to sequence vnodes into VRECLAIMED.  All
vnode special state processing now uses a VX lock.

Vnodes are now able to be slowly returned to the memory pool when
kern.maxvnodes is reduced at run time.

Various initialization elements have been moved to CTOR/DTOR and are
no longer in the critical path, improving performance.  However, since
SYSREF uses atomic_cmpset_int() (aka cmpxchgl), which reduces performance
somewhat, overall performance tends to be about the same.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Dec 23 00:41:29 2006 UTC (7 years, 7 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +2 -2 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Aug 12 00:26:20 2006 UTC (7 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +7 -16 lines
VNode sequencing and locking - part 3/4.

VNode aliasing is handled by the namecache (aka nullfs), so there is no
longer a need to have VOP_LOCK, VOP_UNLOCK, or VOP_ISSLOCKED as 'VOP'
functions.  Both NFS and DEADFS have been using standard locking functions
for some time and are no longer special cases.  Replace all uses with
native calls to vn_lock, vn_unlock, and vn_islocked.

We can't have these as VOP functions anyhow because of the introduction of
the new SYSLINK transport layer, since vnode locks are primarily used to
protect the local vnode structure itself.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Wed Jul 19 06:08:11 2006 UTC (8 years ago) by dillon
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +3 -3 lines
Introduce sys/syslink.h, the beginnings of a VOP-compatible RPC-like
communications infrastructure that will be used for userland VFS and
communications between hosts in a cluster.

Begin merging the vnode operations vector code with syslink by replacing
vnodeop_desc with syslink_desc.  Also get rid of a lot of junk related
to vnodeop_desc that is no longer used.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Jul 18 22:22:15 2006 UTC (8 years ago) by dillon
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +82 -95 lines
Remove several layers in the vnode operations vector init code.  Declare
the operations vector directly instead of via a descriptor array.  Remove
most of the recalculation code, it stopped being needed over a year ago.

This work is similar to what FreeBSD now does, but was developed along a
different line.  Ultimately our vop_ops will become SYSLINK ops for userland
VFS and clustering support.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat May 6 02:43:13 2006 UTC (8 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +31 -42 lines
The thread/proc pointer argument in the VFS subsystem originally existed
for...  well, I'm not sure *WHY* it originally existed when most of the
time the pointer couldn't be anything other then curthread or curproc or
the code wouldn't work.  This is particularly true of lockmgr locks.

Remove the pointer argument from all VOP_*() functions, all fileops functions,
and most ioctl functions.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri May 5 21:15:09 2006 UTC (8 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +11 -13 lines
Simplify vn_lock(), VOP_LOCK(), and VOP_UNLOCK() by removing the thread_t
argument.  These calls now always use the current thread as the lockholder.
Passing a thread_t to these functions has always been questionable at best.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Apr 28 16:45:34 2006 UTC (8 years, 2 months ago) by swildner
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +3 -2 lines
Move the error check into the else clause because it only applies there.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Apr 27 08:19:29 2006 UTC (8 years, 2 months ago) by swildner
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +3 -1 lines
Add missing braces.

Submitted-by: Csaba Henk <csaba.henk@creo.hu>

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Apr 7 06:38:30 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +18 -17 lines
Due to continuing issues with VOP_READ/VOP_WRITE ops being called without
a VOP_OPEN, particularly by NFS, redo the way VM objects are associated
with vnodes.

* The size of the object is now passed to vinitvmio().  vinitvmio() no
  longer calls VOP_GETATTR().

* Instead of trying to call vinitvmio() conditionally in various places,
  we now call it unconditionally when a vnode is instantiated if
  the filesystem at any time in the future intends to use the buffer
  cache to access that vnode's dataspace.

* Specfs 'disk' devices are an exception.  Since we cannot safely do I/O
  on such vnodes if they have not been VOP_OPEN()'ed anyhow, the VM objects
  for those vnodes are still only associated on open.

The performance impact is limited to the case where large numbers of vnodes
are being created and destroyed.  This case only occurs when a large
directory topology (number of files > kernel's vnode cache) is traversed
and all related inodes are cached by the system.  Being a pure-cpu case
the slight loss of performance due to the VM object allocations is
not really a big dael.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Apr 6 17:04:30 2006 UTC (8 years, 3 months ago) by swildner
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +1 -1 lines
Change forgotten getinoquota to ext2_getinoquota to fix building
with 'options QUOTA'.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Apr 5 21:06:22 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +16 -12 lines
Synchronize vinitvmio() calls from UFS to EXT2FS.

Reported-by: Csaba Henk <csaba.henk@creo.hu>

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Apr 4 17:34:32 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +1154 -79 lines
Transplant all the UFS ops that EXT2 used to call into the EXT2 tree and
reconnect it to the build.  Recent BUF/BIO work made most of the UFS tree
incompatible with EXT2FS.

Reported-by: Csaba Henk <csaba.henk@creo.hu>

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Feb 17 19:18:07 2006 UTC (8 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +3 -3 lines
Make the entire BUF/BIO system BIO-centric instead of BUF-centric.  Vnode
and device strategy routines now take a BIO and must pass that BIO to
biodone().  All code which previously managed a BUF undergoing I/O now
manages a BIO.

The new BIO-centric algorithms allow BIOs to be stacked, where each layer
represents a block translation, completion callback, or caller or device
private data.  This information is no longer overloaded within the BUF.
Translation layer linkages remain intact as a 'cache' after I/O has completed.

The VOP and DEV strategy routines no longer make assumptions as to which
translated block number applies to them.  The use the block number in the
BIO specifically passed to them.

Change the 'untranslated' constant to NOOFFSET (for bio_offset), and
(daddr_t)-1 (for bio_blkno).  Rip out all code that previously set the
translated block number to the untranslated block number to indicate
that the translation had not been made.

Rip out all the cluster linkage fields for clustered VFS and clustered
paging operations.  Clustering now occurs in a private BIO layer using
private fields within the BIO.

Reformulate the vn_strategy() and dev_dstrategy() abstraction(s).  These
routines no longer assume that bp->b_vp == the vp of the VOP operation, and
the dev_t is no longer stored in the struct buf.  Instead, only the vp passed
to vn_strategy() (and related *_strategy() routines for VFS ops), and
the dev_t passed to dev_dstrateg() (and related *_strategy() routines for
device ops) is used by the VFS or DEV code.  This will allow an arbitrary
number of translation layers in the future.

Create an independant per-BIO tracking entity, struct bio_track, which
is used to determine when I/O is in-progress on the associated device
or vnode.

NOTE: Unlike FreeBSD's BIO work, our struct BUF is still used to hold
the fields describing the data buffer, resid, and error state.

Major-testing-by: Stefan Krueger

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jan 13 21:09:27 2006 UTC (8 years, 6 months ago) by swildner
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +4 -4 lines
* Remove (void) casts for discarded return values.

* Put function types on separate lines.

* Ansify function definitions.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Sep 14 01:13:35 2005 UTC (8 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +25 -25 lines
Rename all the functions and structures for the old VOP namespace API
functions from vop_* to vop_old_*.  e.g. vop_lookup -> vop_old_lookup.
This will make it easier to identify areas containing old VOP API code.

Remove vop_old_*_ap() functions, they are not used (and not allowed to be
used).  The old API is only allowed at the leaf of a VFS stack.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Jun 6 15:35:06 2005 UTC (9 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +1 -0 lines
Add some missing #include's from the last commit.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jun 6 15:09:37 2005 UTC (9 years, 1 month ago) by drhodus
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +4 -5 lines
Replace spl with critical sections.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Apr 15 19:08:16 2005 UTC (9 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Stable
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +44 -23 lines
Implement Red-Black trees for the vnode clean/dirty buffer lists.

Implement ranged fsyncs and adjust the syncer to use the new capability.
This capability will also soon be used to replace the write_behind
heuristic.  Rewrite the fsync code for all VFSs to use the new APIs
(generally simplifying them).

Get rid of B_WRITEINPROG, it is no longer useful or needed.
Get rid of B_SCANNED, it is no longer useful or needed.

Rewrite the NFS 2-phase commit protocol to take advantage of the new
Red-Black tree topology.

Add RB_SCAN() for callback-scanning of Red-Black trees.  Give RB_SCAN
the ability to track the 'next' scan node and automatically fix it up
if the callback directly or indirectly or through blocking indirectly
deletes nodes in the tree while the scan is in progress.

Remove most related loop restart conditions, they are no longer necessary.

Disable filesystem background bitmap writes.  This really needs to be
solved a different way and the concept does not work well with red-black
trees.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Feb 15 08:32:18 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +24 -24 lines
Introduce vnodepv_entry_t as type for the vnodeopv_entry functions.
This is slightly better than casting all the functions to void *,
which is a data pointer.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Dec 22 02:17:07 2004 UTC (9 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +1 -0 lines
Make sure that cn_flags is properly updated to account for side effects
for *_checkpath(), otherwise relookup will panic on an assertion.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Nov 12 00:09:30 2004 UTC (9 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +122 -51 lines
VFS messaging/interfacing work stage 9/99: VFS 'NEW' API WORK.

NOTE: unionfs and nullfs are temporarily broken by this commit.

* Remove the old namecache API.  Remove vfs_cache_lookup(), cache_lookup(),
  cache_enter(), namei() and lookup() are all gone.  VOP_LOOKUP() and
  VOP_CACHEDLOOKUP() have been collapsed into a single non-caching
  VOP_LOOKUP().

* Complete the new VFS CACHE (namecache) API.  The new API is able to
  supply topological guarentees and is able to reserve namespaces,
  including negative cache spaces (whether the target name exists or not),
  which the new API uses to reserve namespace for things like NRENAME
  and NCREATE (and others).

* Complete the new namecache API.  VOP_NRESOLVE, NLOOKUPDOTDOT, NCREATE,
  NMKDIR, NMKNOD, NLINK, NSYMLINK, NWHITEOUT, NRENAME, NRMDIR, NREMOVE.
  These new calls take (typicaly locked) namecache pointers rather then
  combinations of directory vnodes, file vnodes, and name components.  The
  new calls are *MUCH* simpler in concept and implementation.  For example,
  VOP_RENAME() has 8 arguments while VOP_NRENAME() has only 3 arguments.

  The new namecache API uses the namecache to lock namespaces without having
  to lock the underlying vnodes.  For example, this allows the kernel
  to reserve the target name of a create function trivially.  Namecache
  records are maintained BY THE KERNEL for both positive and negative hits.

  Generally speaking, the kernel layer is now responsible for resolving
  path elements.  NRESOLVE is called when an unresolved namecache record
  needs to be resolved.  Unlike the old VOP_LOOKUP, NRESOLVE is simply
  responsible for associating a vnode to a namecache record (positive hit)
  or telling the system that it's a negative hit, and not responsible for
  handling symlinks or other special cases or doing any of the other
  path lookup work, much unlike the old VOP_LOOKUP.

  It should be particularly noted that the new namecache topology does not
  allow disconnected namecache records.  In rare cases where a vnode must
  be converted to a namecache pointer for new API operation via a file handle
  (i.e. NFS), the cache_fromdvp() function is provided and a new API VOP,
  VOP_NLOOKUPDOTDOT() is provided to allow the namecache to resolve the
  topology leading up to the requested vnode.  These and other topological
  guarentees greatly reduce the complexity of the new namecache API.

  The new namei() is called nlookup().  This function uses a combination
  of cache_n*() calls, VOP_NRESOLVE(), and standard VOP calls resolve the
  supplied path, deal with symlinks, and so forth, in a nice small compact
  compartmentalized procedure.

* The old VFS code is no longer responsible for maintaining namecache records,
  a function which was mostly adhoc cache_purge()s occuring before the VFS
  actually knows whether an operation will succeed or not.

  The new VFS code is typically responsible for adjusting the state of
  locked namecache records passed into it.  For example, if NCREATE succeeds
  it must call cache_setvp() to associate the passed namecache record with
  the vnode representing the successfully created file.  The new requirements
  are much less complex then the old requirements.

* Most VFSs still implement the old API calls, albeit somewhat modified
  and in particular the VOP_LOOKUP function is now *MUCH* simpler.  However,
  the kernel now uses the new API calls almost exclusively and relies on
  compatibility code installed in the default ops (vop_compat_*()) to
  convert the new calls to the old calls.

* All kernel system calls and related support functions which used to do
  complex and confusing namei() operations now do far less complex and
  far less confusing nlookup() operations.

* SPECOPS shortcutting has been implemented.  User reads and writes now go
  directly to supporting functions which talk to the device via fileops
  rather then having to be routed through VOP_READ or VOP_WRITE, saving
  significant overhead.  Note, however, that these only really effect
  /dev/null and /dev/zero.

  Implementing this was fairly easy, we now simply pass an optional
  struct file pointer to VOP_OPEN() and let spec_open() handle the
  override.

SPECIAL NOTES: It should be noted that we must still lock a directory vnode
LK_EXCLUSIVE before issuing a VOP_LOOKUP(), even for simple lookups, because
a number of VFS's (including UFS) store active directory scanning information
in the directory vnode.  The legacy NAMEI_LOOKUP cases can be changed to
use LK_SHARED once these VFS cases are fixed.  In particular, we are now
organized well enough to actually be able to do record locking within a
directory for handling NCREATE, NDELETE, and NRENAME situations, but it hasn't
been done yet.

Many thanks to all of the testers and in particular David Rhodus for
finding a large number of panics and other issues.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Oct 12 19:20:55 2004 UTC (9 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +12 -12 lines
VFS messaging/interfacing work stage 8/99: Major reworking of the vnode
interlock and other miscellanious things.  This patch also fixes FS
corruption due to prior vfs work in head.  In particular, prior to this
patch the namecache locking could introduce blocking conditions that
confuse the old vnode deactivation and reclamation code paths.  With
this patch there appear to be no serious problems even after two days
of continuous testing.

* VX lock all VOP_CLOSE operations.
* Fix two NFS issues.  There was an incorrect assertion (found by
  David Rhodus), and the nfs_rename() code was not properly
  purging the target file from the cache, resulting in Stale file
  handle errors during, e.g. a buildworld with an NFS-mounted /usr/obj.
* Fix a TTY session issue.  Programs which open("/dev/tty" ,...) and
  then run the TIOCNOTTY ioctl were causing the system to lose track
  of the open count, preventing the tty from properly detaching.
  This is actually a very old BSD bug, but it came out of the woodwork
  in DragonFly because I am now attempting to track device opens
  explicitly.
* Gets rid of the vnode interlock.  The lockmgr interlock remains.
* Introduced VX locks, which are mandatory vp->v_lock based locks.
* Rewrites the locking semantics for deactivation and reclamation.
  (A ref'd VX lock'd vnode is now required for vgone(), VOP_INACTIVE,
  and VOP_RECLAIM).  New guarentees emplaced with regard to vnode
  ripouts.
* Recodes the mountlist scanning routines to close timing races.
* Recodes getnewvnode to close timing races (it now returns a
  VX locked and refd vnode rather then a refd but unlocked vnode).
* Recodes VOP_REVOKE- a locked vnode is now mandatory.
* Recodes all VFS inode hash routines to close timing holes.
* Removes cache_leaf_test() - vnodes representing intermediate
  directories are now held so the leaf test should no longer be
  necessary.
* Splits the over-large vfs_subr.c into three additional source
  files, broken down by major function (locking, mount related,
  filesystem syncer).

* Changes splvm() protection to a critical-section in a number of
  places (bleedover from another patch set which is also about to be
  committed).

Known issues not yet resolved:

* Possible vnode/namecache deadlocks.
* While most filesystems now use vp->v_lock, I haven't done a final
  pass to make vp->v_lock mandatory and to clean up the few remaining
  inode based locks (nwfs I think and other obscure filesystems).
* NullFS gets confused when you hit a mount point in the underlying
  filesystem.
* Only UFS and NFS have been well tested
* NFS is not properly timing out namecache entries, causing changes made
  on the server to not be properly detected on the client if the client
  already has a negative-cache hit for the filename in question.

Testing-by: David Rhodus <sdrhodus@gmail.com>,
	    Peter Kadau <peter.kadau@tuebingen.mpg.de>,
	    walt <wa1ter@myrealbox.com>,
	    others

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Aug 17 18:57:33 2004 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +3 -16 lines
VFS messaging/interfacing work stage 2/99.  This stage retools the vnode ops
vector dispatch, making the vop_ops a per-mount structure rather then a
per-filesystem structure.  Filesystem mount code, typically in blah_vfsops.c,
must now register various vop_ops pointers in the struct mount to compile
its VOP operations set.

This change will allow us to begin adding per-mount hooks to VFSes to support
things like kernel-level journaling, various forms of cache coherency
management, and so forth.

In addition, the vop_*() calls now require a struct vop_ops pointer as the
first argument instead of a vnode pointer (note: in this commit the VOP_*()
macros currently just pull the vop_ops pointer from the vnode in order to
call the vop_*() procedures).  This change is intended to allow us to divorce
ourselves from the requirement that a vnode pointer always be part of a VOP
call.  In particular, this will allow namespace based routines such as
remove(), mkdir(), stat(), and so forth to pass namecache pointers rather then
locked vnodes and is a very important precursor to the goal of using the
namecache for namespace locking.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Aug 13 17:51:10 2004 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +31 -31 lines
VFS messaging/interfacing work stage 1/99.  This stage replaces the old
dynamic VFS descriptor and inlined wrapper mess with a fixed structure
and fixed procedural wrappers.  Most of the work is straightforward except
for vfs_init, which was basically rewritten (and greatly simplified).

It is my intention to make the vop_*() call wrappers eventually handle
range locking and cache coherency issues as well as implementing the
direct call -> messaging interface layer.  The call wrappers will also
API translation as we shift the APIs over to new, more powerful mechanisms
in order to allow the work to be incrementally committed.

This is the first stage of what is likely to be a huge number of stages
to modernize the VFS subsystem.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jul 2 15:43:10 2004 UTC (10 years ago) by joerg
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0A_REL
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +4 -4 lines
Remove invalid tokens after #endif

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Apr 24 04:32:03 2004 UTC (10 years, 3 months ago) by drhodus
Branches: MAIN
CVS tags: DragonFly_1_0_RC1
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +2 -2 lines
Remove the VREF() macro and uses of it.
Remove uses of 0x20 before ^I inside vnode.h

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Apr 8 20:57:52 2004 UTC (10 years, 3 months ago) by cpressey
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +43 -72 lines
Style(9) cleanup to src/sys/vfs, stage 5/21: ext2fs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 1 06:33:20 2004 UTC (10 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +11 -11 lines
Newtoken commit.  Change the token implementation as follows:  (1) Obtaining
a token no longer enters a critical section.  (2) tokens can be held through
schedular switches and blocking conditions and are effectively released and
reacquired on resume.  Thus tokens serialize access only while the thread
is actually running.  Serialization is not broken by preemptive interrupts.
That is, interrupt threads which preempt do no release the preempted thread's
tokens.  (3) Unlike spl's, tokens will interlock w/ interrupt threads on
the same or on a different cpu.

The vnode interlock code has been rewritten and the API has changed.  The
mountlist vnode scanning code has been consolidated and all known races have
been fixed.  The vnode interlock is now a pool token.

The code that frees unreferenced vnodes whos last VM page has been freed has
been moved out of the low level vm_page_free() code and moved to the
periodic filesystem sycer code in vfs_msycn().

The SMP startup code and the IPI code has been cleaned up considerably.
Certain early token interactions on AP cpus have been moved to the BSP.

The LWKT rwlock API has been cleaned up and turned on.

Major testing by: David Rhodus

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Sep 23 05:03:52 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +10 -10 lines
namecache work stage 1: namespace cleanups.  Add a NAMEI_ prefix to
CREATE, LOOKUP, DELETE, and RENAME.  Add a CNP_ prefix too all the name
lookup flags (nd_flags) e.g. ISDOTDOT->CNP_ISDOTDOT.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Aug 20 09:56:31 2003 UTC (10 years, 11 months ago) by rob
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +14 -14 lines
__P()!=wanted, remove old style prototypes from the vfs subtree

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:17:41 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +11 -11 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Jul 26 18:53:21 2003 UTC (11 years ago) by rob
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +10 -10 lines
Register keyword removal

Approved by: Matt Dillon

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Jul 21 07:57:43 2003 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +22 -21 lines
LINT build test.  Aggregated source code adjustments to bring most of the
rest of the kernel source up to date, using the LINT build.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Jul 19 21:14:32 2003 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +2 -2 lines
Remove the priority part of the priority|flags argument to tsleep().  Only
flags are passed now.  The priority was a user scheduler thingy that is not
used by the LWKT subsystem.  For process statistics assume sleeps without
P_SINTR set to be disk-waits, and sleeps with it set to be normal sleeps.

This commit should not contain any operational changes.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jun 25 03:55:52 2003 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +2 -2 lines
proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
pointers instead of process pointers as arguments, similar to what FreeBSD-5
did.  Note however that ultimately both APIs are going to be message-passing
which means the current thread context will not be useable for creds and
descriptor access.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:34 2003 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:54:34 2003 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.51.2.2

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options