[lkml]   [2000]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa
    >>>>> " " == Linus Torvalds <> writes:

    > Btw, that "invalidate_inode_pages()" thing is just wrong - we
    > can't just remove pages that are mapped etc, because that would
    > result in no end of fun aliasing problems etc.

    > How about adding a test in invalidate_inode_pages() like

    > /* We cannot invalidate a locked page */ if
    > (TryLockPage(page))
    > continue;

    > + /* We cannot invalidate a page that is in use */
    > + if (page_count(page) != 1) {
    > + UnlockPage(page);
    > + continue;
    > + }
    > +
    > __lru_cache_del(page); __remove_inode_page(page);

    The problem here is that NFS pages have 3 rather than 2 states:
    1) mmapped & correct.
    2) mmapped & incorrect. (but possibly dirty)
    3) Unmapped

    For case 1), we clearly want to have the page in inode->i_mapping.
    For cases 2) & 3) we don't.

    However for case 2) we still have a weak association to the inode
    itself, and we want to be able to reference inode metadata etc. Would
    it make sense then to remove these pages from i_mapping, but to hang
    them onto a new struct address_space (call it i_unmapped for want of a
    better name)?

    That would allow you to keep a consistent state for the page, while
    still allowing you to 'invalidate' it (by removing it from the
    i_mapping) and hence maintain a consistent cache.

    invalidate_inode_pages() would then reduce to

    if (page_count(page))

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

     \ /
      Last update: 2005-03-22 12:41    [W:0.022 / U:145.416 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site