cvs commit: src/sys/ufs/ffs ffs_snapshot.c

Jeff Roberson jeff at FreeBSD.org
Mon Mar 31 00:47:08 PDT 2008


jeff        2008-03-31 07:47:08 UTC

  FreeBSD src repository

  Modified files:
    sys/ufs/ffs          ffs_snapshot.c 
  Log:
   - Don't free snapdata structures when they are no longer in use.
     Keeping the lockmgr lock valid allows us to switch the v_lock pointer
     in snapshot vnodes between the embedded lockmgr lock and snapdata
     lock without needing the vnode interlock to protect against races
   - Keep unused snapdata structures in a list.
   - Add a function to lock the devvp and allocate a snapdata to it or
     acquire a new one without races.  The old function was safe from
     creation races because we set the mount flag when creating snapshots
     and thus serializing them.  However, it might have been subject to
     destroying races.
  
  Reviewed by:    tegge
  
  Revision  Changes    Path
  1.142     +109 -67   src/sys/ufs/ffs/ffs_snapshot.c


More information about the cvs-all mailing list