LWN.net Logo

XFS: the filesystem of the future?

XFS: the filesystem of the future?

Posted Feb 1, 2012 11:33 UTC (Wed) by Cato (subscriber, #7643)
In reply to: XFS: the filesystem of the future? by dgc
Parent article: XFS: the filesystem of the future?

Maybe I didn't quite get your point - would be good to understand exactly what write ordering guarantees are provided by server storage but not consumer storage. Is this just that a consumer hard drive's write cache will reorder writes without respecting the kernel's write barriers?


(Log in to post comments)

XFS: the filesystem of the future?

Posted Feb 1, 2012 19:28 UTC (Wed) by dlang (✭ supporter ✭, #313) [Link]

some consumer drives lie about when the data has actually been written to disk (making write barriers ineffective), in those cases the OS will send more writes to the drive and the drive will go ahead and re-order them with the other writes that are in it's buffer.

XFS: the filesystem of the future?

Posted Feb 1, 2012 20:13 UTC (Wed) by raven667 (subscriber, #5198) [Link]

And as someone else pointed out drives these days seem to have up to 64MB write buffers so that could be a lot of corruption if that data goes missing in-flight when the OS was told that it was permanently committed.

XFS: the filesystem of the future?

Posted Feb 1, 2012 22:20 UTC (Wed) by magila (subscriber, #49627) [Link]

While there's been a lot of talk about consumer devices "lying" in this thread, they really don't behave any differently from server drives with the same cache settings. Both consumer and server drives provide an option to turn on write caching. Both will lie about writes completing when write caching is enabled. Both will only signal command completion when data has gone to disk if write caching is disabled[1]. The only real difference is the default, most (but not all) enterprise drives ship with write cache disabled while all consumer drive ship with it enabled. Both give the option of changing the setting to whatever the user pleases.

[1] I vaguely remember hearing a story several years ago that a handful of ATA drive models where not respecting write cache settings. This was an isolated incident. Newer drives can reasonably be assumed to handle write caching correctly.

XFS: the filesystem of the future?

Posted Feb 2, 2012 1:39 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

when I talk about a drive lying, I'm not talking about normal write caching, I'm talking about it either not respecting write cache settings, or lying about data integrity commands that are supposed to work even in the face of write caching (cache flush commands for example)

most consumer drives don't have these problems, but a few have been found to have them.

unfortunately you cannot just assume that newer dries will not have the problem. On the database mailing lists you see a couple drive models every year where someone runs across the problem yet again.

XFS: the filesystem of the future?

Posted Feb 2, 2012 2:40 UTC (Thu) by magila (subscriber, #49627) [Link]

"On the database mailing lists you see a couple drive models every year where someone runs across the problem yet again."

I'd be rather surprised if that were the case. The code that handles cache flushing isn't something which usually changes between models. If a manufacturer's firmware had a bug in that area I'd expect to see it across the board, not just randomly poping up periodically on different SKUs.

XFS: the filesystem of the future?

Posted Feb 2, 2012 13:11 UTC (Thu) by cladisch (✭ supporter ✭, #50193) [Link]

> The code that handles cache flushing isn't something which usually changes between models. If a manufacturer's firmware had a bug …

You won't get any manufacturer to admit it, but this is not a bug, it's a feature (to get higher benchmark numbers).

XFS: the filesystem of the future?

Posted Feb 2, 2012 17:38 UTC (Thu) by magila (subscriber, #49627) [Link]

You might not believe it, but I can say based on first hand experience that hard drive manufacturers take data integrity very seriously. None of them would risk losing customer data just to gain extra performance. The potential backlash from data loss would be far worse than scoring lower on a benchmark.

Plus the people running benchmarks, especially for tier 1 OEMs, aren't stupid. Lying about cache flushes is pretty easy to detect so the likelihood of getting away with it is pretty low right from the start. Pissing off OEMs is another thing hard drive manufactures would never, ever take risks with.

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