DragonFly BSD
DragonFly commits List (threaded) for 2004-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/bus/usb src/sys/emulation/43bsd src/sys/emulation/linux src/sys/emulation/linux/i386/linprocfs src/sys/emulation/svr4 src/sys/kern src/sys/sys src/sys/vfs/coda src/sys/vfs/fdesc src/sys/vfs/gnu/ext2fs src/sys/vfs/hpfs src/sys/vfs/isofs/cd9660 ...


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Sep 2004 12:00:29 -0700 (PDT)

dillon      2004/09/30 12:00:29 PDT

DragonFly src repository

  Modified files:
    sys/bus/usb          usb_port.h 
    sys/emulation/43bsd  43bsd_stats.c 
    sys/emulation/linux  linux_file.c linux_stats.c 
    sys/emulation/linux/i386/linprocfs linprocfs_vfsops.c 
    sys/emulation/svr4   svr4_misc.c 
    sys/kern             init_main.c kern_descrip.c vfs_cache.c 
                         vfs_conf.c vfs_default.c vfs_lookup.c 
                         vfs_nlookup.c vfs_syscalls.c vfs_vopops.c 
    sys/sys              file.h kern_syscall.h mount.h namecache.h 
                         nlookup.h systm.h vfsops.h vnode.h 
    sys/vfs/coda         coda_vfsops.c coda_vfsops.h 
    sys/vfs/fdesc        fdesc_vfsops.c 
    sys/vfs/gnu/ext2fs   ext2_lookup.c ext2_vfsops.c 
    sys/vfs/hpfs         hpfs_vfsops.c hpfs_vnops.c 
    sys/vfs/isofs/cd9660 cd9660_lookup.c cd9660_vfsops.c 
    sys/vfs/mfs          mfs_vfsops.c 
    sys/vfs/msdosfs      msdosfs_lookup.c msdosfs_vfsops.c 
    sys/vfs/nfs          nfs_vfsops.c nfs_vnops.c 
    sys/vfs/ntfs         ntfs_vfsops.c ntfs_vnops.c 
    sys/vfs/nullfs       null_vfsops.c 
    sys/vfs/nwfs         nwfs_io.c nwfs_vfsops.c nwfs_vnops.c 
    sys/vfs/portal       portal_vfsops.c 
    sys/vfs/procfs       procfs_vfsops.c 
    sys/vfs/smbfs        smbfs_io.c smbfs_vfsops.c smbfs_vnops.c 
    sys/vfs/udf          udf_vfsops.c udf_vnops.c 
    sys/vfs/ufs          ffs_vfsops.c ufs_lookup.c 
    sys/vfs/umapfs       umap_vfsops.c 
    sys/vfs/union        union_vfsops.c 
  Log:
  VFS messaging/interfacing work stage 7/99.  BEGIN DESTABILIZATION!
  
  Implement the infrastructure required to allow us to begin switching to the
  new nlookup() VFS API.
  
  	filedesc->fd_ncdir, fd_nrdir, fd_njdir
  
  	    File descriptors (associated with processes) now record the
  	    namecache pointer related to the current directory, root directory,
  	    and jail directory, in addition to the vnode pointers.  These
  	    pointers are used as the basis for the new path lookup code
  	    (nlookup() and friends).
  
  	file->f_ncp
  
  	    File pointers may now have a referenced+unlocked namecache
  	    pointer associated with them.  All fp's representing directories
  	    have this attached.  This allows fchdir() to properly record
  	    the ncp in fdp->fd_ncdir and friends.
  
  	mount->mnt_ncp
  
  	    The namecache topology for crossing a mount point works as
  	    follows: when looking up a path element which is a mount point,
  	    cache_nlookup() will locate the ncp for the vnode-under the
  	    mount point.  mount->mnt_ncp represents the root of the mount,
  	    that is the vnode-over.  nlookup() detects the mount point and
  	    accesses mount->mnt_ncp to skip past the vnode-under.  When going
  	    backwards (..), nlookup() detects the case and skips backwards.
  
  	    The ncp linkages are: ncp->ncp->ncp[vnode_under]->ncp[vnode_over].
  	    That is, when going forwards or backwards nlookup must explicitly
  	    skip over the double-ncp when crossing a mount point.  This allows
  	    us to keep the namecache topology intact across mount points.
  
  NEW CACHE level API functions:
  
  	cache_get()	Reference and lock a namecache entry
  	cache_put()	Dereference and unlock a namecache entry
  	cache_lock()	lock an already-referenced namecache entry
  	cache_unlock()	unlock a lockednamecache entry
  
  	    NOTE: namecache locks are exclusive and recursive.  These are
  	    the 'namespace' locks that we will be using to guarentee namespace
  	    operations such as in a CREATE, RENAME, or REMOVE.
  
  	vfs_cache_setroot() 	Set the new system-wide root directory
  	cache_allocroot()   	System bootstrap helper function to allocate
  			    	 the root namecache node.
  
  	cache_resolve()		Resolve a NCF_UNRESOLVED namecache node.  The
  				namecache node should be locked on call.
  
  	cache_setvp()		(resolver) associate a VP or create a negative
  				cache entry representation for a namecache
  				pointer and clear NCF_UNRESOLVED.  The
  				namecache node should be locked on call.
  
  	cache_setunresolved()	Revert a resolved namecache entry back to an
  				unresolved state, disassociating any vnode
  				but leaving the topology intact.  The
  				namecache node should be locked on call.
  
  	cache_vget()		Obtain the locked+refd vnode related to
  				a namecache entry, resolving the entry if
  				necessary.  Return ENOENT if the entry
  				represents a negative cache hit.
  
  	cache_vref()		Obtained a refd (not locked) vnode related to
  				a namecache entry, as above.
  
  	cache_nlookup()		The new namecache lookup routine.  This routine
  				does a lookup and allocates a new namecache
  				node (into an unresolved state) if necessary.
  				Returns a namecache record whether or not
  				the item can be found and whether or not it
  				represents a positive or negative hit.
  
  	cache_lookup()		OLD API CODE DEPRECATED, but must be maintained
  				until everything has been converted over.
  	cache_enter()		OLD API CODE DEPRECATED, but must be maintained
  				until everything has been converted over.
  
  NEW default VOPs
  
  	vop_noresolve()		Implements a namecache resolver for VFSs
  				which are still using the old VOP_LOOKUP/
  				VOP_CACHEDLOOKUP API (which is all of them
  				still).
  
  	VOP_LOOKUP		OLD API CODE DEPRECATED, but must be maintained
  				until everything has been converted over.
  	VOP_CACHEDLOOKUP	OLD API CODE DEPRECATED, but must be maintained
  				until everything has been converted over.
  
  NEW PATHNAME LOOKUP CODE
  
  	nlookup_init()		Similar to NDINIT, initialize a nlookupdata
  				structure for nlookup() and nlookup_done().
  
  	nlookup()		Lookup a path.  Unlike the old namei/lookup
  				code the new lookup code does not do any
  				fancy pre-disposition of the cache for
  				create/delete, it simply looks up the requested
  				path and returns the appropriate locked
  				namecache pointer.  The caller can obtain the
  				vnode and directory vnode, as applicable, from
  				the one namecache structure that is returned.
  
  				Access checks are done on directories leading
  				up to the result but not done on the returned
  				namecache node.
  
  	nlookup_done()		Mandatory routine to cleanup a nlookupdata
  				structure after it has been initialized and
  				all operations have been completed on it.
  
  	nlookup_simple()	(in progress) all-in-one wrapped new lookup.
  
  	nlookup_mp()		helper call for resolving a mount point's
  				glue NCP.  hackish, will be cleaned up later.
  
  	nreadsymlink()		helper call to resolve a symlink.  Note that
  				the namecache does not yet cache symlink data
  				but the intention is to eventually do so to
  				avoid having to do VFS ops to get the data.
  
  	naccess()		Perform access checks on a namecache node
  				given a mode and cred.
  
  	naccess_va()		Perform access cheks on a vattr given a
  				mode and cred.
  
  Begin switching VFS operations from using namei to using nlookup.
  In this batch:
  
  	* mount 	(install mnt_ncp for cross-mount-point handling in
  			nlookup, simplify the vfs_mount() API to no longer
  			pass a nameidata structure)
  	* [l]stat	(use nlookup)
  	* [f]chdir	(use nlookup, use recorded f_ncp)
  	* [f]chroot	(use nlookup, use recorded f_ncp)
  
  Revision  Changes    Path
  1.11      +1 -1      src/sys/bus/usb/usb_port.h
  1.3       +17 -18    src/sys/emulation/43bsd/43bsd_stats.c
  1.17      +7 -7      src/sys/emulation/linux/linux_file.c
  1.13      +29 -36    src/sys/emulation/linux/linux_stats.c
  1.7       +2 -3      src/sys/emulation/linux/i386/linprocfs/linprocfs_vfsops.c
  1.24      +2 -2      src/sys/emulation/svr4/svr4_misc.c
  1.38      +12 -9     src/sys/kern/init_main.c
  1.29      +4 -0      src/sys/kern/kern_descrip.c
  1.29      +255 -228  src/sys/kern/vfs_cache.c
  1.12      +3 -1      src/sys/kern/vfs_conf.c
  1.15      +80 -9     src/sys/kern/vfs_default.c
  1.17      +0 -1      src/sys/kern/vfs_lookup.c
  1.2       +283 -28   src/sys/kern/vfs_nlookup.c
  1.40      +231 -97   src/sys/kern/vfs_syscalls.c
  1.8       +35 -2     src/sys/kern/vfs_vopops.c
  1.11      +2 -0      src/sys/sys/file.h
  1.19      +5 -3      src/sys/sys/kern_syscall.h
  1.13      +5 -3      src/sys/sys/mount.h
  1.10      +11 -9     src/sys/sys/namecache.h
  1.2       +21 -8     src/sys/sys/nlookup.h
  1.23      +0 -1      src/sys/sys/systm.h
  1.7       +15 -3     src/sys/sys/vfsops.h
  1.23      +9 -1      src/sys/sys/vnode.h
  1.16      +6 -6      src/sys/vfs/coda/coda_vfsops.c
  1.5       +2 -3      src/sys/vfs/coda/coda_vfsops.h
  1.9       +2 -3      src/sys/vfs/fdesc/fdesc_vfsops.c
  1.14      +2 -2      src/sys/vfs/gnu/ext2fs/ext2_lookup.c
  1.20      +10 -9     src/sys/vfs/gnu/ext2fs/ext2_vfsops.c
  1.21      +8 -7      src/sys/vfs/hpfs/hpfs_vfsops.c
  1.18      +1 -1      src/sys/vfs/hpfs/hpfs_vnops.c
  1.13      +2 -2      src/sys/vfs/isofs/cd9660/cd9660_lookup.c
  1.21      +9 -10     src/sys/vfs/isofs/cd9660/cd9660_vfsops.c
  1.18      +2 -4      src/sys/vfs/mfs/mfs_vfsops.c
  1.11      +2 -2      src/sys/vfs/msdosfs/msdosfs_lookup.c
  1.19      +9 -9      src/sys/vfs/msdosfs/msdosfs_vfsops.c
  1.21      +2 -4      src/sys/vfs/nfs/nfs_vfsops.c
  1.31      +5 -5      src/sys/vfs/nfs/nfs_vnops.c
  1.22      +10 -9     src/sys/vfs/ntfs/ntfs_vfsops.c
  1.16      +1 -1      src/sys/vfs/ntfs/ntfs_vnops.c
  1.12      +9 -10     src/sys/vfs/nullfs/null_vfsops.c
  1.11      +1 -1      src/sys/vfs/nwfs/nwfs_io.c
  1.12      +2 -4      src/sys/vfs/nwfs/nwfs_vfsops.c
  1.16      +2 -2      src/sys/vfs/nwfs/nwfs_vnops.c
  1.12      +2 -3      src/sys/vfs/portal/portal_vfsops.c
  1.9       +2 -3      src/sys/vfs/procfs/procfs_vfsops.c
  1.12      +1 -1      src/sys/vfs/smbfs/smbfs_io.c
  1.14      +2 -4      src/sys/vfs/smbfs/smbfs_vfsops.c
  1.18      +2 -2      src/sys/vfs/smbfs/smbfs_vnops.c
  1.8       +7 -8      src/sys/vfs/udf/udf_vfsops.c
  1.8       +2 -2      src/sys/vfs/udf/udf_vnops.c
  1.25      +9 -10     src/sys/vfs/ufs/ffs_vfsops.c
  1.14      +2 -2      src/sys/vfs/ufs/ufs_lookup.c
  1.12      +9 -10     src/sys/vfs/umapfs/umap_vfsops.c
  1.15      +9 -9      src/sys/vfs/union/union_vfsops.c


http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/usb_port.h.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/emulation/43bsd/43bsd_stats.c.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/emulation/linux/linux_file.c.diff?r1=1.16&r2=1.17&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/emulation/linux/linux_stats.c.diff?r1=1.12&r2=1.13&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/emulation/linux/i386/linprocfs/linprocfs_vfsops.c.diff?r1=1.6&r2=1.7&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/emulation/svr4/svr4_misc.c.diff?r1=1.23&r2=1.24&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/init_main.c.diff?r1=1.37&r2=1.38&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_descrip.c.diff?r1=1.28&r2=1.29&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_cache.c.diff?r1=1.28&r2=1.29&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_conf.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_default.c.diff?r1=1.14&r2=1.15&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_lookup.c.diff?r1=1.16&r2=1.17&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_nlookup.c.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_syscalls.c.diff?r1=1.39&r2=1.40&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_vopops.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/file.h.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/kern_syscall.h.diff?r1=1.18&r2=1.19&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/mount.h.diff?r1=1.12&r2=1.13&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/namecache.h.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/nlookup.h.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/systm.h.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/vfsops.h.diff?r1=1.6&r2=1.7&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/vnode.h.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/coda/coda_vfsops.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/coda/coda_vfsops.h.diff?r1=1.4&r2=1.5&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/fdesc/fdesc_vfsops.c.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/gnu/ext2fs/ext2_lookup.c.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/gnu/ext2fs/ext2_vfsops.c.diff?r1=1.19&r2=1.20&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hpfs/hpfs_vfsops.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hpfs/hpfs_vnops.c.diff?r1=1.17&r2=1.18&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/isofs/cd9660/cd9660_lookup.c.diff?r1=1.12&r2=1.13&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/isofs/cd9660/cd9660_vfsops.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/mfs/mfs_vfsops.c.diff?r1=1.17&r2=1.18&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/msdosfs/msdosfs_lookup.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/msdosfs/msdosfs_vfsops.c.diff?r1=1.18&r2=1.19&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_vfsops.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_vnops.c.diff?r1=1.30&r2=1.31&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ntfs/ntfs_vfsops.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ntfs/ntfs_vnops.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nullfs/null_vfsops.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nwfs/nwfs_io.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nwfs/nwfs_vfsops.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nwfs/nwfs_vnops.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/portal/portal_vfsops.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/procfs/procfs_vfsops.c.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/smbfs/smbfs_io.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/smbfs/smbfs_vfsops.c.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/smbfs/smbfs_vnops.c.diff?r1=1.17&r2=1.18&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/udf/udf_vfsops.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/udf/udf_vnops.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ffs_vfsops.c.diff?r1=1.24&r2=1.25&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ufs_lookup.c.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/umapfs/umap_vfsops.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/union/union_vfsops.c.diff?r1=1.14&r2=1.15&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]