• David Sterba's avatar
    btrfs: qgroup: do quick checks if quotas are enabled before starting ioctls · 34064fc3
    David Sterba authored
    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: default avatarAnand Jain <anand.jain@oracle.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    34064fc3
ioctl.c 119 KB