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
but on modern disks you really don't know where the borders of a track are. it's really just
an array of blocks
Barriers and journaling filesystems
Posted May 25, 2008 2:47 UTC (Sun) by giraffedata (subscriber, #1954)
I don't know what "but" refers to here; I made a statement about "if I were a disk drive," and the disk drive definitely knows where the borders of the tracks are. And though I have no actual evidence of it, I would be very surprised if the disk drive did not use that knowledge to optimize performance.
The idea suggested in the article that ext3 tends to get ordered writes (to the platters) because it usually does journal updates in logical block number order seems to assume that the disk drive does writes from cache to platter in logical block number order. I can't believe that it would do that, even usually, because it would be so much slower than optimum.
Posted May 25, 2008 3:27 UTC (Sun) by dlang (✭ supporter ✭, #313)
the drive will write an entire track at a time (they have done so for years)
but you have no way of knowing if the journal that you allocated spans a track boundry (since
you don't know where the boundry is), and you also don't know if the drive has re-allocated
any blocks to avoid bad spots on the disk in the middle of your journal.
either one of these will destroy the atomic nature of writes to the journal
Posted May 25, 2008 6:40 UTC (Sun) by giraffedata (subscriber, #1954)
Nobody's said anything about ext3 knowing where the blocks are physically, so I don't know why you bring that up. The article just says ext3 updates the journal in logical block number order and suggests that means they tend to go the platter in the same order.
And I've been saying I don't believe that.
Posted May 25, 2008 10:53 UTC (Sun) by dlang (✭ supporter ✭, #313)
I misunderstood what you were saying. I thought that you were saying that if the entire
journal was on the same track it would get written all at once, even if it wrapped over the
end of the journal.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds