Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-progs: add recursive subvol delete #861

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

adam900710
Copy link
Collaborator

Adds a --recursive option to btrfs subvol delete, causing it to pass the BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE flag through to libbtrfsutil.

This is a resubmission of part of a patch that Omar Sandoval sent in 2018, which appears to have been overlooked:
https://lore.kernel.org/linux-btrfs/e42cdc5d5287269faf4d09e8c9786d0b3adeb658.1516991902.git.osandov@fb.com/

Reviewed-by: Qu Wenruo [email protected]

Documentation/btrfs-subvolume.rst Show resolved Hide resolved
cmds/subvolume.c Show resolved Hide resolved
Adds a --recursive option to btrfs subvol delete, causing it to pass the
BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE flag through to libbtrfsutil.

This is a resubmission of part of a patch that Omar Sandoval sent in
2018, which appears to have been overlooked:
https://lore.kernel.org/linux-btrfs/e42cdc5d5287269faf4d09e8c9786d0b3adeb658.1516991902.git.osandov@fb.com/

Signed-off-by: Mark Harmstone <[email protected]>
Co-authored-by: Mark Harmstone <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
[ Add details to man page, fix indent in the doc. ]
Signed-off-by: Qu Wenruo <[email protected]>
@adam900710 adam900710 merged commit 29da0fe into kdave:devel Aug 12, 2024
@adam900710 adam900710 deleted the recursive_subv_delete branch August 12, 2024 23:08
kdave pushed a commit that referenced this pull request Aug 14, 2024
Add new option --recursive 'btrfs subvol delete', causing it to pass the
BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE flag through to libbtrfsutil.

This can work in two modes, depending on the user:

- regular user - this will skip subvolumes that are not accessible
- root (CAP_SYS_ADMIN) - no limitations

Pull-request: #861
Signed-off-by: Mark Harmstone <[email protected]>
Co-authored-by: Omar Sandoval <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
[ Add details to man page, fix indent in the doc. ]
Signed-off-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
kdave pushed a commit that referenced this pull request Aug 15, 2024
Add new option --recursive 'btrfs subvol delete', causing it to pass the
BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE flag through to libbtrfsutil.

This can work in two modes, depending on the user:

- regular user - this will skip subvolumes that are not accessible
- root (CAP_SYS_ADMIN) - no limitations

Pull-request: #861
Signed-off-by: Mark Harmstone <[email protected]>
Co-authored-by: Omar Sandoval <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
[ Add details to man page, fix indent in the doc. ]
Signed-off-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
@kdave kdave added this to the v6.11 milestone Aug 21, 2024
kdave pushed a commit that referenced this pull request Sep 17, 2024
Add new option --recursive 'btrfs subvol delete', causing it to pass the
BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE flag through to libbtrfsutil.

This can work in two modes, depending on the user:

- regular user - this will skip subvolumes that are not accessible
- root (CAP_SYS_ADMIN) - no limitations

Pull-request: #861
Signed-off-by: Mark Harmstone <[email protected]>
Co-authored-by: Omar Sandoval <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
[ Add details to man page, fix indent in the doc. ]
Signed-off-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
@kdave kdave modified the milestones: v6.11, v6.12 Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants