linux/include
Marcos Paulo de Souza 949964c928 btrfs: add new BTRFS_IOC_SNAP_DESTROY_V2 ioctl
This ioctl will be responsible for deleting a subvolume using its id.
This can be used when a system has a file system mounted from a
subvolume, rather than the root file system, like below:

/
@subvol1/
@subvol2/
@subvol_default/

If only @subvol_default is mounted, we have no path to reach @subvol1
and @subvol2, thus no way to delete them. Current subvolume delete ioctl
takes a file handle point as argument, and if @subvol_default is
mounted, we can't reach @subvol1 and @subvol2 from the same mount point.

This patch introduces a new ioctl BTRFS_IOC_SNAP_DESTROY_V2 that takes
the extended structure with flags to allow to delete subvolume using
subvolid.

Now, we can use this new ioctl specifying the subvolume id and refer to
the same mount point. It doesn't matter which subvolume was mounted,
since we can reach to the desired one using the subvolume id, and then
delete it.

The full path to the subvolume id is resolved internally and access is
verified as if the subvolume was accessed by path.

The volume args v2 structure is extended to use the existing union for
subvolume id specification, that's valid in case the
BTRFS_SUBVOL_SPEC_BY_ID is set.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-23 17:01:42 +01:00
..
acpi ACPI fixes for 5.6-rc4 2020-02-28 09:02:18 -08:00
asm-generic Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
clocksource clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources 2020-01-16 19:09:02 +01:00
crypto crypto: x86/curve25519 - support assemblers with no adx support 2020-03-05 18:28:09 +11:00
drm drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks 2020-03-12 19:07:24 -04:00
dt-bindings clk: imx8mn: Fix incorrect clock defines 2020-02-17 15:18:00 +08:00
keys
kunit
kvm
linux Merge branch 'akpm' (patches from Andrew) 2020-03-22 10:46:50 -07:00
math-emu
media
misc
net fib: add missing attribute validation for tun_id 2020-03-03 13:28:48 -08:00
pcmcia
ras
rdma RDMA/core: Make the entire API tree static 2020-01-30 16:28:52 -04:00
scsi scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-14 17:13:54 -05:00
soc net: mscc: ocelot: properly account for VLAN header length when setting MRU 2020-03-09 18:58:17 -07:00
sound ASoC: Fixes for v5.6 2020-03-07 07:24:36 +01:00
target
trace btrfs: switch to per-transaction pinned extents 2020-03-23 17:01:38 +01:00
uapi btrfs: add new BTRFS_IOC_SNAP_DESTROY_V2 ioctl 2020-03-23 17:01:42 +01:00
vdso lib/vdso: Prepare for time namespace support 2020-01-14 12:20:57 +01:00
video
xen xen/xenbus: fix locking 2020-03-05 09:42:23 -06:00