btrfs-progs: subvol delete: update EPERM error message
The message could be confusing in case there's no send in progress and the real reason is lack of permissions when deleting a subvolume. Mention the permissions as first reason. Also update documentation. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f5e07cc60a
commit
447f976472
|
@ -79,6 +79,9 @@ delete [options] [<subvolume> [<subvolume>...]], delete -i|--subvolid <subvolid>
|
|||
crash. Use one of the *--commit* options to wait until the operation is
|
||||
safely stored on the device.
|
||||
|
||||
Deleting subvolume needs sufficient permissions, by default the owner
|
||||
cannot delete it unless it's enabled by a mount option
|
||||
*user_subvol_rm_allowed*, or deletion is run as root.
|
||||
The default subvolume (see ``btrfs subvolume set-default``) cannot be deleted and
|
||||
returns error (EPERM) and this is logged to the system log. A subvolume that's
|
||||
currently involved in send (see ``btrfs send``) also cannot be deleted until the
|
||||
|
|
|
@ -423,7 +423,7 @@ again:
|
|||
|
||||
error_btrfs_util(err);
|
||||
if (saved_errno == EPERM)
|
||||
warning("deletion failed with EPERM, send may be in progress");
|
||||
warning("deletion failed with EPERM, you don't have permissions or send may be in progress");
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue