Date: Fri, 29 Oct 2004 12:01:56 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: saggarwa@cs.utah.edu Cc: freebsd-hackers@FreeBSD.org Subject: Re: flushing disk buffer cache Message-ID: <200410291904.i9TJ1u0A026971@gw.catspoiler.org> In-Reply-To: <Pine.GSO.4.50L0.0410291129360.25989-100000@faith.cs.utah.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 Oct, Siddharth Aggarwal wrote: > > Another related question ... > > Is it possible to delay or queue up disk writes until I exit from my > function in the kernel (where I am trying to sync with the disk)? Or > make sure that my sync function never goes to sleep waiting for the disk > driver to signal completion of flushes to disk? Take a look at how the snapshot code handles this. It has to be done above the level of individual disk operations because certain file system operations require multiple disk I/O operations to transform the file system from one consistent state to another consistent state. If you try to checkpoint in the middle of this sequence, you will capture a state where the file system is internally inconsistent.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410291904.i9TJ1u0A026971>