]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
show additional info if btrfs subvolume deletion fails (issue #315)
authorS.Çağlar Onur <caglar@10ur.org>
Fri, 22 Aug 2014 16:10:12 +0000 (12:10 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 19 Sep 2014 23:00:35 +0000 (19:00 -0400)
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 <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/bdev.c

index 15c89cc45f73cf5d5a18aa26774b142f75bfec57..449aca20e404757a84e41c4a4b3c28e67fb9de5d 100644 (file)
@@ -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);