Subject: Re: Question: various bugs in sync()?
To: None <email@example.com>
From: Charles M. Hannum <firstname.lastname@example.org>
Date: 01/15/1999 12:35:45
As for your implied questions:
All file data (including indirect blocks) is cached by the vnode of
the file. So, the current implementation of sync(2) will never flush
file data `twice'. Other metadata (including directories) is cached
with the vnode of the mount, and if a delayed write is done that
buffer could be visited twice. In practice, delayed writes are
currently never done on much of this data, although that will change.
Of course, they won't actually be written twice. On the second pass,
the buffers will either be BUSY, or will have already been written.
(Please don't ask me why the caching is implemented this way. I
happen to think it's pretty silly.)