Re: [patch 2/4] vfs: add set_page_dirty_notag
From: Peter Zijlstra
Date: Tue Feb 17 2009 - 05:05:34 EST
On Tue, 2009-02-17 at 10:38 +0100, Nick Piggin wrote:
> It is a great shame that filesystems are not properly notified
> that a page may become dirty before the actual set_page_dirty
> event (which is not allowed to fail and is called after the
> page is already dirty).
Not quite true, for example the set_page_dirty() done by the write fault
code is done _before_ the page becomes dirty.
This before/after thing was the reason for that horrid file corruption
bug that dragged on for a few weeks back in .19 (IIRC).
> This is a big problem I have with fsblock simply in trying to
> make the memory allocation robust. page_mkwrite unfortunately
> is racy and I've fixed problems there... the big problem though
> is get_user_pages. Fixing that properly seems to require fixing
> callers so it is not really realistic in the short term.
Right, I'm just not sure what we can do, even with a
prepage_page_dirty() function, what are you going to do, fail the fault?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/