]> git.ipfire.org Git - thirdparty/lxc.git/commit
bdev: be smarter about btrfs subvolume detection 1125/head
authorChristian Brauner <cbrauner@suse.de>
Fri, 12 Aug 2016 19:07:34 +0000 (21:07 +0200)
committerChristian Brauner <cbrauner@suse.de>
Fri, 12 Aug 2016 22:40:17 +0000 (00:40 +0200)
commit6e0fa6a0c65eda9c6586baebbfdfc82cc7c7ebe6
tree2ff837d3683fea2570b7e2cb487d3ff49b75f28d
parent6fe1146ddb7c9c828273ffdd20ac4dc2edac52f5
bdev: be smarter about btrfs subvolume detection

When a container c is on a btrfs filesystem but is directory backed, copying
the container will default to snapshot. This is because of
should_default_to_snapshot() returning true in this case because c is on a
btrfs filesystem. We should make sure that should_default_to_snapshot() only
returns true, when c itself is a btrfs subvolume.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
src/lxc/bdev/lxcbtrfs.c
src/lxc/bdev/lxcbtrfs.h
src/lxc/lxccontainer.c