]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Don't free snapdata structures when they are no longer in use.
authorjeff <jeff@FreeBSD.org>
Mon, 31 Mar 2008 07:47:08 +0000 (07:47 +0000)
committerjeff <jeff@FreeBSD.org>
Mon, 31 Mar 2008 07:47:08 +0000 (07:47 +0000)
commit5e4f326d87a3ff8fcfa0d54104443f7c36248506
tree46d0b334f810035210924641173871b00bdf08b1
parentbd1adacdf1e555a14b1b6382c42a0bbfe1fbb3ed
 - 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
sys/ufs/ffs/ffs_snapshot.c