]> git.proxmox.com Git - mirror_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, 22 Aug 2014 18:52:28 +0000 (13:52 -0500)
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 e4b32a124d79dbd8d397da4c4e8fadd92151a8fd..4fc10f2aa189da39a051eab1dfae8e8daaad2556 100644 (file)
@@ -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);