[lkml]   [2007]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
    On Thu, 24 May 2007 23:34:33 +0100
    David Howells <> wrote:

    > Andrew Morton <> wrote:
    > > So my reason for asking the above is to try to find a way to make all these
    > > new PG-error games just go away.
    > Yeah. However, there needs to be something to cover the gap between releasing
    > PG_writeback and getting PG_lock. They have to be done in that order to avoid
    > deadlocking against truncate and other stuff, but that leaves a window in which
    > the page appears to be in a good state - one in which prepare_write() or
    > page_mkwrite() can potentially leak through.

    hm. I don't see why that race window would be a problem in practice: the
    page-exciser does a lock_page();wait_on_page_writeback() as normal, then
    proceeds with its business?

    But given that this doesn't work right for some reason, can we use PG_error
    and then handle that appropriately in the filesystem's ->prepare_write() and

    > Nick Piggin talked about using an extra lock, but as far as I can tell, that
    > just compounds the deadlock problems.
    > I suppose I could leave something in page->private that indicated that the
    > page was defunct, but that'd have to be done by the filesystem, probably
    > before calling cancel_rejected_write().

    Well, using PG_error is OK and appropriate for that if it's localised to
    the fs. But I'd be a bit worried about requiring that the VFS maintain
    some special protocol for it, partly because it would be such a
    rarely-tested thing.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-05-25 00:49    [W:0.020 / U:5.212 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site