• Arne Jansen's avatar
    btrfs: keep orphans for subvolume deletion · f8e9e0b0
    Arne Jansen authored
    Since we have the free space caches, btrfs_orphan_cleanup also runs for
    the tree_root. Unfortunately this also cleans up the orphans used to mark
    subvol deletions in progress.
    
    Currently if a subvol deletion gets interrupted twice by umount/mount, the
    deletion will not be continued and the space permanently lost, though it
    would be possible to write a tool to recover those lost subvol deletions.
    This patch checks if the orphan belongs to a subvol (dead root) and skips
    the deletion.
    Signed-off-by: default avatarArne Jansen <sensille@gmx.net>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    f8e9e0b0
inode.c 196 KB