]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: keep orphans for subvolume deletion
authorArne Jansen <sensille@gmx.net>
Thu, 15 Dec 2011 01:12:02 +0000 (20:12 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 15 Dec 2011 15:50:37 +0000 (10:50 -0500)
commit8010f1b6460dd7a75b2f1689d001ff5db9c60b2e
tree3950d7dfe50186637b0bcca0d38943a64c9dff8c
parent70f2b2378b763a79ca23c3c00c9ac122d68a9a06
btrfs: keep orphans for subvolume deletion

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: Arne Jansen <sensille@gmx.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c