User: Password:
|
|
Subscribe / Log in / New account

A nasty file corruption bug - fixed

A nasty file corruption bug - fixed

Posted Jan 2, 2007 18:34 UTC (Tue) by iabervon (subscriber, #722)
In reply to: A nasty file corruption bug - fixed by kay
Parent article: A nasty file corruption bug - fixed

But I don't think that's actually true. If the I/O on the block is active, it has already cleared the bh's dirty bit (because the rule is that you clear dirty bits when you decide to write out data, not when you finish, to plug exactly the race you're talking about), and therefore set_page_dirty() will set it and things will be okay. I think this was Linus's second-to-last theory (something was cleaning a buffer after it sent the data to the disk), but it turned out not to be the problem.

The issue is if the page gets written out after set_page_dirty() but before the last write to the page, because the VM didn't redirty buffers in dirty pages when more writes came in. After getting the concurrent dirtying case correct, it essentially missed the case of writes to a clean part of a dirty page.


(Log in to post comments)


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