• Andrew Morton's avatar
    [PATCH] fix failure to write ext2 indirects under load · b51c26f7
    Andrew Morton authored
    This patch fixes a filesystem corrupting bug, present in 2.5.41 through
    2.5.44.  It can cause ext2 indirect blocks to not be written out.  A
    fsck will fix it up.
    
    Under heavy memory pressure a PF_MEMALLOC task attemtps to write out a
    blockdev page whose buffers are already under writeback and which were
    dirtied while under writeback.
    
    The writepage call returns -EAGAIN but because the caller is
    PF_MEMALLOC, the page was not being marked dirty again.
    
    The page sits on mapping->clean_pages for ever and it not written out.
    
    The fix is to mark that page dirty again for all callers, regardless of
    PF_MEMALLOC state.
    b51c26f7
mpage.c 17.5 KB