• Andrew Morton's avatar
    [PATCH] fix writeback for dirty ramdisk blockdev inodes · 71a1f72c
    Andrew Morton authored
    Once the blockdev inode for /dev/ram0 is dirtied we have a memory-backed
    inode on the blockdev superblock's s_dirty list.
    
    sync_sb_inodes() sees the memory-backed inode on the superblock and assumes
    that all the other inodes on the superblock are also memory-backed.  This is
    not true for the blockdev superblock!  We forget to write out dirty pages
    against the following blockdevs.
    
    Fix this by just leaving the inode dirty and moving on to inspect the other
    blockdev inodes on sb->s_io.
    
    (This is a little inefficient: an alternative is to leave dirtied
    memory-backed inodes on inode_in_use, so nobody ever even considers them for
    writeout.  But that introduces an inconsistency and is a bit kludgey).
    71a1f72c
fs-writeback.c 16.5 KB