[Gllug] re: qmail file-system syncing

itsbruce at uklinux.net itsbruce at uklinux.net
Mon Nov 10 18:20:13 UTC 2003


On Mon, Nov 10, 2003 at 05:50:30PM +0000, Richard Cohen wrote:
> On Mon, 10 Nov 2003 itsbruce at uklinux.net wrote:
> 
> > On Mon, Nov 10, 2003 at 05:35:01PM +0000, Richard Cottrill wrote:
> > > That said, synchronizing the whole filesystem does seem a bit of a
> > > kludge at first blush.
> >
> > Syncing the filesystem simply means flushing any cached writes for the
> > filesystem.  There's no such thing as syncing *part* of the filesystem
> > (unless you are using "filesystem" to mean "everything under /", as
> > opposed to the individual mounted filesystems).
> 
> Really?
> 
> What's fsync then?

On Linux, fsync doesn't do a proper job (not according to the POSIX
spec, anyway).  To achieve a consistent filesystem using fsync on Linux
you would have to check all the inode's filenames and then fsync all the
containing directories.  But yes, you're right, you can use fsync to
sync specific files to disk, if you tread carefully.

-- 
Bruce

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list