forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs: allow BTRFS_IOC_SNAP_DESTROY_V2 to remove ghost subvolume
There is a report from the mail list that some subvolumes don't have any ROOT_REF/BACKREF and has 0 ref. But without an ORPHAN item. Such ghost subvolumes can't be deleted by any ioctl but only rely on btrfs-progs to add ORPHAN item. Normally kernel only needs to gracefully abort/reject such corrupted structure, but in this case we have all the needed infrastructures and interface to allow BTRFS_IOC_SNAP_DESTROY_V2 to delete it. So add the ability to delete such ghost subvolumes to BTRFS_IOC_SNAP_DESTROY_V2. Signed-off-by: Qu Wenruo <wqu@suse.com>
- Loading branch information
1 parent
5d6ac4b
commit 391ab00
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters