From: S.Çağlar Onur Date: Fri, 22 Aug 2014 16:10:12 +0000 (-0400) Subject: show additional info if btrfs subvolume deletion fails (issue #315) X-Git-Tag: lxc-1.0.6~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b96d9f6d73382bf3a03de180763f5ad1de819a1;p=thirdparty%2Flxc.git show additional info if btrfs subvolume deletion fails (issue #315) Unprivileged users require "-o user_subvol_rm_allowed" mount option for btrfs. Make the INFO level message to ERROR to make it clear, which now says following; [caglar@qop:~] lxc-destroy -n rubik lxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed? lxc_container: Error destroying rootfs for rubik Destroying rubik failed Signed-off-by: S.Çağlar Onur Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index 15c89cc45..449aca20e 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -1551,7 +1551,7 @@ static int btrfs_do_destroy_subvol(const char *path) ret = ioctl(fd, BTRFS_IOC_SNAP_DESTROY, &args); INFO("btrfs: snapshot destroy ioctl returned %d for %s", ret, path); if (ret < 0 && errno == EPERM) - INFO("Is the rootfs mounted with -o user_subvol_rm_allowed?"); + ERROR("Is the rootfs mounted with -o user_subvol_rm_allowed?"); free(newfull); close(fd);