4 ms·
"When a dirty page is written to disk, write() to the same dirty page is blocked until flushing to disk is done." I'm not sure I got this, but this seems simil
by MrBuddyCasino 12y ago
"When a dirty page is written to disk, write() to the same dirty page is blocked until flushing to disk is done."
I'm not sure I got this, but this seems similar to vsync - making sure only complete 4k pages are written to disk, and then flipping the buffer and processing the next one.
But what error condition does this guard against? It seems this is only useful in a non-journaled file system.
- TheLoneWolfling 12y agoIf you don't lock, you can get a situation where the file on disk is in an inconsistent state until all writes have completed (for example, half of the second write applied but the other half not, etc) As far as I know, at least. If (when) I'm wrong, please correct me.
- MrBuddyCasino 12y agoYes, isn 't that a situation that a journaled FS should prevent? So for e.g. XFS it should be redundant.