]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: qgroup: do quick checks if quotas are enabled before starting ioctls
authorDavid Sterba <dsterba@suse.com>
Thu, 2 May 2024 21:11:33 +0000 (23:11 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:16 +0000 (15:33 +0200)
commit34064fc3c9b557789a33214de0af6d6e09e4a0c8
tree1db12920f5c3a5f5aa3d6f62d386e739e75a96e6
parent256abd8e550ce977b728be79a74e1729438b4948
btrfs: qgroup: do quick checks if quotas are enabled before starting ioctls

The ioctls that add relations, create qgroups or set limits start/join
transaction. When quotas are not enabled this is not necessary, there
will be errors reported back anyway but this could be also misleading
and we should really report that quotas are not enabled. For that use
-ENOTCONN.

The helper is meant to do a quick check before any other standard ioctl
checks are done. If quota is disabled meanwhile we still rely on proper
locking inside any active operation changing the qgroup structures.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c