cvs commit: src/sys/sys vnode.h namecache.h src/sys/kern vfs_subr.c vfs_cache.c

Matthew Dillon dillon at
Thu Apr 8 10:57:35 PDT 2004

dillon      2004/04/08 10:56:48 PDT

DragonFly src repository

  Modified files:
    sys/sys              vnode.h namecache.h 
    sys/kern             vfs_subr.c vfs_cache.c 
  namecache work stage 4:
  (1) Remove vnode->v_dd, vnode->v_ddid, namecache->nc_dvp_data, and
  namecache->nc_dvp_id.  These identifiers were being used to detect stale
  parent directory linkages in the namecache and were leftovers from the
  original FreeBSD-4.x namecache topology.  The new namecache topology
  actively discards such linkages and does not require them.
  (2) Cleanup kern/vfs_cache.c, abstracting out allocation and parent
  link/unlink operations into their own procedures.
  (3) Formally allow a disjoint topology.  That is, allow the case where
  nc_parent is NULL.  When constructing namecache entries (dvp,vp), require
  that that dvp be associated with a namecache record so we can create the
  proper parent->child linkage.  Since no naming information is known for
  dbp, formally allow unnamed namecache records to be created in order to
  create the association.
  (4) Properly relink parent namecache entries when ".." is entered into
  the cache.  This is what relinks a disjoint namecache topology after it
  has been partially purged or when the namecache is instantiated in the
  middle of the logical topology (and thus disjoint).
  Note that the original plan was to not allow a disjoint topology, but after
  much hair pulling I've come to the conclusion that it is impossible to do
  this.  So the work now formally allows a disjoint topology but also, unlike
  the original FreeBSD code, takes pains to try to keep the topology intact
  by only recycling 'leaf' vnodes.  This is accomplished by vref()ing a vnode
  when its namecache records have children.
  Revision  Changes    Path
  1.14      +0 -7      src/sys/sys/vnode.h
  1.3       +3 -10     src/sys/sys/namecache.h
  1.29      +0 -1      src/sys/kern/vfs_subr.c
  1.15      +156 -121  src/sys/kern/vfs_cache.c

More information about the Commits mailing list