:
:But the buffer to buffer dependencies are already recorded in the
:sequence on the "sync-wheel" which the syncer daemon runs through,
:isn't it ?
:
:--
:Poul-Henning Kamp FreeBSD coreteam member
:[EMAIL PROTECTED] "Real hackers run -current on their laptop."
Only very roughly. The syncer wheel tries to order whole vnodes amoungst
whole vnodes, making the distinction between vnode types VDIR, VBLK,
and VREG. This helps reduce the amount of rewriting that softupdates
must accomplish, but it only orders buffer dependancies in a very rough
fashion.
Within the dirtyblkhd list in each vnode, which lists the dirty buffers,
we also do a rough ordering. If you look at reassignbuf() in vfs_subr.c
you will see how this works. We attempt to sort blocks in the dirtyblkhd
list and we place meta data (negative block numbers) at the end of the
list instead of at the head. The idea here is to write out data blocks
before writing out the meta-data. If the meta-data were to be written out
first softupdates would step in and rearrange the meta-data being written
to the physical media to take into account the fact that the data blocks
have not yet been written. In otherwords, the metadata buffer would remain
dirty.
But both of these ordering cases are only rough approximations designed h
to reduce the amount of work that softupdates must accomplish.
Softupdates understands the concept of filesystem dependancies such as,
for example, a directory entry depending on an inode. but softupdates
does *NOT* directly understand 'macro' buffer<->buffer dependancies so
there is no 'chain of buffers' for the flushing code to follow to get
things in the right order.
-Matt
Matthew Dillon
<[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message