Does UFS2 send BIO_FLUSH to GEOM when update metadata (with
lev at freebsd.org
Wed Nov 23 20:04:20 UTC 2011
You wrote 23 ноября 2011 г., 23:44:44:
>> Does UFS2 with softupdates (without journal) issues BIO_FLUSH to
>> GEOM layer when it need to ensure consistency on on-disk metadata?
> No. Softupdates do not need flushes.
It need flushes. Because WITHOUT flashes on modern storage
architectures there is no way to be sure, that (I'm quoting your last
sentence) "writes reported as done by disk driver are indeed safely
landed in the involatile storage."
It is sad, but it is true. Disk controllers have caches, disks have
caches. In virtual environment and with NAS (iSCSIS/FC/Whatever)
everything is even worse. And every layer LAYS about "landing", it was
shown, for example, by Brad Fitzpatrick many years ago (http://brad.livejournal.com/2116715.html).
If SU don't mark its writes in special way as strictly-synchronous,
SU could not be sure, that data is really LANDED when bio is marked as
complete one. As far as I understand, there is no such way to mark bio
with BIO_WRITE command as such special case, and only way to ensure
landing is to call BIO_FLUSH after BIO_WRITE.
> You are making wrong conclusions from the false assumptions.
> The only requirement of the SU is that writes reported as done by disk
> driver are indeed safely landed in the involatile storage.
See above. Only BIO_FLUSH could give some (but, again, not 100%, but
"best effort") guarantee, that completed BIO_WRITE is really landed.
Data could be queued on many layers, and without explicit FLUSH it
could not be really written for seconds or even minutes (but reported
For example, for RAID5 descent performance it is vital to have some
write cache. And when it is software implementation, UPS could not
help from system panics.
So, it is very sad, that SU and SU+J don't epress their requirements
via code! It seems, that even SU+J will not help from crashes in case
when some GEOM does write caching.
// Black Lion AKA Lev Serebryakov <lev at serebryakov.spb.ru>
More information about the freebsd-fs