|
|
Subscribe / Log in / New account

What about other filesystems?

What about other filesystems?

Posted Jan 17, 2021 20:31 UTC (Sun) by matthias (subscriber, #94967)
In reply to: What about other filesystems? by Wol
Parent article: Fast commits for ext4

>> Taking code that didn't require fsync (because it didn't (sic) exist) and, in the words of zlynx, saying that "it's broken" makes all ISO C code that needs data safety broken, which seems extreme.
>Actually, I think that's called a regression, is it not? And one of Linus' absolute rules is "no regressions", isn't it?
There is no regression. The code works as good as back in the days. Back in the days it was clear, that the data is only safe is the system is working properly, including no power outages. If you make sure that your system never crashes, the old code will work fine. If the system crashes, the old code might loose data, but this was always the case with this code. If you want additional guarantees (like no data loss in case of power loss), you have to use fsync.

Best,
Matthias


to post comments

What about other filesystems?

Posted Jan 17, 2021 21:23 UTC (Sun) by Wol (subscriber, #4433) [Link] (1 responses)

mmmm

The risk of a corrupted filesystem hasn't changed.

But if the application writes a journal before doing an update, then provided there's no collateral damage it can recover from a crash mid transaction on an old unix system.

On a new system, it can't be sure whether the transaction log is okay and the update is damaged, or the transaction log is damaged and the transaction is lost, or even worse the transaction log is damaged and the transaction is partially complete!

Cheers,
Wol

What about other filesystems?

Posted Jan 18, 2021 10:29 UTC (Mon) by farnz (subscriber, #17727) [Link]

No, because even on ancient systems, you had elevator reordering for performance, and no guarantees about metadata writes; in the event of a crash, you simply did not know the state of the update or the transaction log, as even if you wrote them in a careful order, the elevator could reorder writes to disk, and the metadata writes might be reordered, too.

In other words, as soon as there's a kernel panic or a power failure, all bets are off on an old UNIX system. This wasn't an issue with reliable systems, but as reliability went down (no dedicated power supplies, no UPSes etc), it became an issue again.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds