O_SYNC
O_SYNC
Posted May 17, 2019 7:38 UTC (Fri) by mpr22 (subscriber, #60784)In reply to: O_SYNC by rweikusat2
Parent article: DAX semantics
Posted May 29, 2019 13:46 UTC (Wed)
by Wol (subscriber, #4433)
[Link]
THAT caused major grief at the ext3/4 transition, iirc. ext3 was "save your data - friendly" by accidental default. ext4 was not. ext3 was NOT sync-friendly, ext4 was.
So you had a choice - write an ext4-friendly program and watch performance go through the floor on ext3, or an ext3-friendly program and watch crashes corrupt your data. NOT nice.
I don't want to know what filesystem my application is running on. I don't want serious differences in behaviour based on that fact. And as someone who is interested in databases and logging and all that, I also probably don't care whether my data made it to disk okay or not, I just want to know that whatever is on disk is consistent!
So the ability to put a "write barrier" in the queue, between the "write the log" and "update the files", is actually important to me. If the log is not updated properly, then the transaction is lost. If the log is safe, and the files are not, I can recover the transaction. Either way, the data is consistent. But if the filesystem moves HALF the file updates before the log is properly saved, I'm screwed.
Cheers,
O_SYNC
Wol