3 ms·
To save others a few minutes with the stable pages patch, it's already in the mainline kernel, visible in sysfs as /sys/block/*/bdi/stable_pages_required. Also
by pas 12y ago
To save others a few minutes with the stable pages patch, it's already in the mainline kernel, visible in sysfs as /sys/block/*/bdi/stable_pages_required.
Also, on a sort of related note, aio is steadily progressing, so maybe we'll see more reliance on it: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=aio%3A http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.g... and libaio too: https://git.fedorahosted.org/cgit/libaio.git/ https://git.fedorahosted.org/cgit/libaio.git/
- 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.