Date: Fri, 31 Dec 2004 08:41:25 -0700 (MST) From: Siddharth Aggarwal <saggarwa@cs.utah.edu> To: Robert Watson <rwatson@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: Freezing filesystem activity Message-ID: <Pine.GSO.4.50L0.0412310836200.22779-100000@faith.cs.utah.edu> In-Reply-To: <Pine.NEB.3.96L.1041231152737.71776S-100000@fledge.watson.org> References: <Pine.NEB.3.96L.1041231152737.71776S-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Dec 2004, Robert Watson wrote: > On Thu, 30 Dec 2004, Siddharth Aggarwal wrote: > > > I want to freeze any filesystem activity in the kernel (a pseudo driver) > > i.e. while my driver code is executing (this code basically flushes > > buffer cache blocks to disk), I donot want any other filesystem > > operations coming in. I tried this by locking the filesystem before my > > code and unlocking right after as shown below. There is a problem > > because it causes a hang (rather it seems as if > > If you would just like to freeze file system write operations, a facility > for this already exists via the vn_start_write() and vn_write_finished() > calls, which are used to gate access to the file system during snapshot > operations. All processes that attempt to start a write operation on the > file system once it's frozen will block waiting until the write lock is > released. If you also need to freeze read operations, that would require > fairly substantial modifications to the kernel to implement something not > disimilar to the above. > > Robert N M Watson > > Thanks for your reply. I believe these functions are available in BSD 5.x and upwards. I am trying to implement this in BSD 4.7. Do you have any suggestions how I can do this (equivalent of vn_start_write() and vn_write_finished())?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.50L0.0412310836200.22779-100000>