Commit 2b96d9f6 by S.Çağlar Onur Committed by Stéphane Graber

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 avatarS.Çağlar Onur <caglar@10ur.org> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 18d27b5b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment