From cf03f973a8649ac6c74680f788f275f547af51a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Fri, 22 Aug 2014 12:10:12 -0400 Subject: [PATCH] show additional info if btrfs subvolume deletion fails (issue #315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/lxc/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index e4b32a124..4fc10f2aa 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -1552,7 +1552,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);