summaryrefslogtreecommitdiff
path: root/cmds-quota.c
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-10-12 21:23:00 +0800
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:01 +0100
commitbbbe7fd7d0f2f104c4c1c54e38524a6496cc9ab6 (patch)
treedb8fad0541f354f5891d8efdc8febb845fa61cef /cmds-quota.c
parent7c2bad665e4f4229a40a4ec234b7a1c6383ee5c3 (diff)
btrfs-progs: qgroup: use btrfs_open_dir for btrfs qgroup command
We can use btrfs_open_dir() to check whether target dir is in btrfs's mount point before open, instead of checking it in kernel space of ioctl, and return fuzzy error message. Before patch: # ./btrfs qgroup create 1/5 /mnt/tmp1 ERROR: unable to create quota group: Inappropriate ioctl for device # # ./btrfs qgroup assign 1/5 2/5 /mnt/tmp1 ERROR: unable to assign quota group: Inappropriate ioctl for device # # ./btrfs qgroup show /mnt/tmp1 ERROR: can't perform the search - Inappropriate ioctl for device ERROR: can't list qgroups: Inappropriate ioctl for device # # ./btrfs qgroup limit 1G 1/5 /mnt/tmp1 ERROR: unable to limit requested quota group: Inappropriate ioctl for device After patch: # ./btrfs qgroup create 1/5 /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs qgroup assign 1/5 2/5 /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs qgroup show /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs qgroup limit 1G 1/5 /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-quota.c')
0 files changed, 0 insertions, 0 deletions