Skip to content
Commit 8a36e408 authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by David Sterba
Browse files

btrfs: qgroup: return ENOTCONN instead of EINVAL when quotas are not enabled



[PROBLEM]
qgroup create/remove code is currently returning EINVAL when the user
tries to create a qgroup on a subvolume without quota enabled. EINVAL is
already being used for too many error scenarios so that is hard to
depict what is the problem.

[FIX]
Currently scrub and balance code return -ENOTCONN when the user tries to
cancel/pause and no scrub or balance is currently running for the
desired subvolume. Do the same here by returning -ENOTCONN  when a user
tries to create/delete/assing/list a qgroup on a subvolume without quota
enabled.

Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e3b0edd2
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