• Dave Kleikamp's avatar
    [PATCH] Fix JFS file system corruption · 3686a398
    Dave Kleikamp authored
    JFS: Flush dirty metadata to disk when remounting from read-write
    to read-only.  Also fix umount ordering to make sure metadata is
    written before journal closed.
    
    With Andrew Morton's recent changes, JFS is no longer writing much
    of its dirty metadata when remounting from read-write to read-only.
    This causes severe file system corruption.  A JFS root file system
    will be corrupted on shutdown.
    
    This patch fixes the problem by explicitly writing the dirty metadata
    before the journal is closed.  It also fixes the ordering so that
    the dirty metadata is completely written before the journal is closed
    for the normal unmount case as well.
    3686a398
jfs_logmgr.c 53 KB