Runtime filesystem consistency checking
Runtime filesystem consistency checking
Posted Apr 3, 2012 17:13 UTC (Tue) by nybble41 (subscriber, #55106)Parent article: Runtime filesystem consistency checking
That may be true of ext3, but in general there are a few reasons why one might want to write to space which has not been allocated *on disk*. Atomic updates come to mind: reserve space in memory, write the new data, and finally--after the data has been committed--reserve it on disk and update the metadata. Online defragmentation or resizing could be implemented this way as well. Unallocated data is "don't care"; it shouldn't be a problem to change it even if the reason for the change is not yet apparent.
This also seems to introduce a second point of failure; the system can cease to function due to a filesystem bug, as before, or due to a bug in Recon which unnecessarily blocks access to the filesystem. That risk would have to be weighed against the cost of filesystem corruption in the absence of Recon, of course.
Posted Apr 3, 2012 19:58 UTC (Tue)
by NAR (subscriber, #1313)
[Link] (2 responses)
This was my first thought too. They are using code to check code, which is kind of like automated tests. In my experience tests are wrong about as many times as the code itself (but this could be due to our fragile test environment), so it's one more thing to get right. On the other hand if Recon is changed a lot fewer times than the filesystem code itself, then Recon can reach sufficient maturity to be actually useful.
Posted Apr 3, 2012 23:28 UTC (Tue)
by neilbrown (subscriber, #359)
[Link]
lockdep is brilliant for developers as it warns you early of your bugs, just as this 'recon' would warn ext3 developers of their bugs.
I'm not sure I'd enable lockdep or recon in production though. There is a real cost, and it is not at all likely to help more than it hurts.
Posted Apr 4, 2012 13:10 UTC (Wed)
by ashvin (guest, #83894)
[Link]
Posted Apr 4, 2012 13:07 UTC (Wed)
by ashvin (guest, #83894)
[Link] (1 responses)
Posted Apr 4, 2012 15:30 UTC (Wed)
by nybble41 (subscriber, #55106)
[Link]
The data would not be useful after a crash; up to the point where the allocation is recorded on disk, there are no references to it, and it can simply revert to unallocated space, canceling the incomplete "transaction".
This also seems to introduce a second point of failure
Runtime filesystem consistency checking
Runtime filesystem consistency checking
But lockdep used to report lots of false positives - this has got a lot better over the years though.
Runtime filesystem consistency checking
Runtime filesystem consistency checking
Runtime filesystem consistency checking