]> git.ipfire.org Git - thirdparty/lxc.git/commit
btrfs: support recursive subvolume deletion (v2)
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 1 Aug 2014 22:55:21 +0000 (22:55 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 8 Aug 2014 18:00:27 +0000 (14:00 -0400)
commitcb69d6e6cd86445c181b449f3d492f348816adda
tree0dcd5c9dd81a8075ae2d9ef7e3f85fa3f61080a8
parent4af2618bc7757406284eec65dfc65ae63d4e2d25
btrfs: support recursive subvolume deletion (v2)

Pull the #defines and struct definitions for btrfs into a separate
.h file to not clutter bdev.c

Implement btrfs recursive delete support

A non-root user isn't allow to do the ioctls needed for searching (as you can
verify with 'btrfs subvolume list').  So for an unprivileged user, if the
rootfs has subvolumes under it, deletion will fail.  Otherwise, it will
succeed.

Changelog: Aug 1:
  . Fix wrong objid passing when determining directory paths
  . In do_remove_btrfs_children, avoid dereferencing NULL dirid
  . Fix memleak in error case.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/Makefile.am
src/lxc/bdev.c
src/lxc/lxc-btrfs.h [new file with mode: 0644]