User: Password:
Subscribe / Log in / New account

XFS: the filesystem of the future?

XFS: the filesystem of the future?

Posted Jan 22, 2012 11:52 UTC (Sun) by pkolloch (subscriber, #21709)
In reply to: XFS: the filesystem of the future? by rfunk
Parent article: XFS: the filesystem of the future?

Well, I had that zero-ing out of data in a small scale with ext4. Since it has happened in the context of system freezes, something else might be to blame, though.

(Log in to post comments)

XFS: the filesystem of the future?

Posted Feb 8, 2012 15:25 UTC (Wed) by Wol (guest, #4433) [Link]

No. ext4 and xfs both had the same bug. So basically anything that stopped disk i/o and forced a reboot could cost you data.

Basically what happened was

(a) user writes file
(b) filesystem writes metadata (file header) to journal
(c) in no particular order, system crashes and journal is flushed to disk

What should, of course, happen next is that the file data is flushed to disk, but because it hasn't been journalled and the system has crashed, it's not there to be written.

And that's why the rename gave you a file full of zeros, because the new file header overwrote the old one, but the new file contents hadn't been flushed to disk.

The fix, with "mode=journal" or whatever, basically blocks the metadata from updating until after the data has updated, by whatever means seems most suitable.


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