• Chris Mason's avatar
    Btrfs: avoid delayed metadata items during commits · e999376f
    Chris Mason authored
    Snapshot creation has two phases.  One is the initial snapshot setup,
    and the second is done during commit, while nobody is allowed to modify
    the root we are snapshotting.
    
    The delayed metadata insertion code can break that rule, it does a
    delayed inode update on the inode of the parent of the snapshot,
    and delayed directory item insertion.
    
    This makes sure to run the pending delayed operations before we
    record the snapshot root, which avoids corruptions.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    e999376f
delayed-inode.h 4.28 KB