summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-10-12 21:23:03 +0800
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:02 +0100
commit0b4e2d0c8a02e3eaaeca47bb306692ab76a0a200 (patch)
tree85bc53a016a9343ae6d2c925b099a123adc001cc /ctree.c
parent078618d82220e84609cffd074655faafbada4c24 (diff)
btrfs-progs: replace: use btrfs_open_dir for btrfs replace 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 replace cancel /mnt/tmp1 ERROR: ioctl(DEV_REPLACE_CANCEL) failed on "/mnt/tmp1": Inappropriate ioctl for device # ./btrfs replace status /mnt/tmp1 ERROR: ioctl(DEV_REPLACE_STATUS) failed on "/mnt/tmp1": Inappropriate ioctl for device After patch: # ./btrfs replace cancel /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs replace status /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 'ctree.c')
0 files changed, 0 insertions, 0 deletions