diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-10-12 21:22:54 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-11-02 09:35:00 +0100 |
commit | 2dfb710803e0ba9f02cb4950c3195b0f88f110ef (patch) | |
tree | 6e715db6a3fd9309cc77ea99af5bbc0d851f047d /cmds-fi-usage.c | |
parent | 86f61d3bb334d05274d4635c35e3a173eccf0062 (diff) |
btrfs-progs: subvolume: use btrfs_open_dir for btrfs subvolume 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:
# (/mnt/tmp is not btrfs mountpoint)
#
# btrfs subvolume create /mnt/tmp/123
Create subvolume '/mnt/tmp/123'
ERROR: cannot create subvolume - Inappropriate ioctl for device
#
After patch:
# btrfs subvolume create /mnt/tmp/123
ERROR: not btrfs filesystem: /mnt/tmp
#
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-usage.c')
0 files changed, 0 insertions, 0 deletions