Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
if what you are writing is metadata, it seems like it shouldn't be that hard, since there isn't that much metadata to be written.
Improving ext4: bigalloc, inline data, and metadata checksums
Posted Dec 4, 2011 11:32 UTC (Sun) by tytso (subscriber, #9993)
Or when you allocate a disk block, you need to modify the block allocation bitmap (or whatever data structure you use to indicate that the block is in use) and then update the data structures which map a particular inode's logical to physical block map.
Without a journal, you can't do this atomically, which means the state of the file system is undefined after a unclean/unexpected shutdown of the OS.
Posted Dec 4, 2011 17:02 UTC (Sun) by kleptog (subscriber, #1183)
Posted Dec 6, 2011 0:40 UTC (Tue) by cmccabe (guest, #60281)
Soft updates would not work for databases, because database operations often need to be logged "logically" rather than "physically." For example, when you encounter an update statement that modifies every row of the table, you just want to add the update statement itself to the journal, not the contents of every row.
Posted Dec 6, 2011 1:24 UTC (Tue) by tytso (subscriber, #9993)
My favorite line from that article is "...and then I turn to page 8 and my head explodes."
The *BSD's didn't get advanced features such as Extended Attribute until some 2 or 3 years after Linux. My theory why is that it required someone as smart as Kirk McKusick to be able to modify UFS with Soft Updates to add support for Extended Attributes and ACL's.
Also, note that because of how Soft Update works, it requires forcing metadata blocks out to disk more frequently than without Soft Updates; it is not free. What's worse, it depends on the disk not reordering write requests, which modern disks do to avoid seeks (in some cases a write can not make it onto the platter in the absence of a Cache Flush request for 5-10 seconds or more). If you disable the HDD's write cacheing, your lose a lot of performance on HDD's; if you leave it enabled (which is the default) your data is not safe.
Posted Dec 11, 2011 10:18 UTC (Sun) by vsrinivas (subscriber, #56913)
Posted Dec 21, 2011 23:09 UTC (Wed) by GalacticDomin8r (guest, #81935)
Duh. Can you name a file system with integrity features that doesn't introduce a performance penalty? I thought not. The point is that the Soft Updates method is (far) less overhead than most.
> What's worse, it depends on the disk not reordering write requests
Bald faced lie. The only requirement of SU's is that writes reported as done by disk driver are indeed safely landed in the nonvolatile storage.
Posted Dec 22, 2011 11:32 UTC (Thu) by nix (subscriber, #2304)
Posted Dec 4, 2011 17:13 UTC (Sun) by mjg59 (subscriber, #23239)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds