Subject: Re: how to bring a mounted filesystem to an almost clean state?
To: Stephan Uphoff <ups@stups.com>
From: Christian Limpach <chris@pin.lu>
List: tech-kern
Date: 02/15/2003 01:50:21
Quoting Stephan Uphoff <ups@stups.com>:
> Christian Limpach wrote:
> > I'm going to try to vn_lock all the vnodes on the filesystem 
> > and then sync.  
> 
> How would you obey the locking order to avoid deadlocks ?

do you mean that the sync will also need to lock those vnodes?  Maybe I could 
have the sync routine keep the locks it acquires?  I haven't really thought 
this through and I'm not too familiar with these issues (yet).  What I want 
to do (block all modifying access to the filesystem) seems to be achieved by 
blocking vn_write's on the filesystem and at a first glance locking the vnode 
seemed to accomplish this.  

Also I'm mostly only looking for a best effort solution, I don't really use 
snapshots much, I implemented the snapshot functionality to test the limits 
of my generic blockdevice mapping framework/driver/ccd-on-steroids-thingy ;-) 

-- 
Christian Limpach <chris@pin.lu>