path: root/cmds-replace.c
diff options
authorZhao Lei <>2015-10-12 21:22:59 +0800
committerDavid Sterba <>2015-11-02 09:35:01 +0100
commit7c2bad665e4f4229a40a4ec234b7a1c6383ee5c3 (patch)
tree884f40146f441dda0a683d52f41e7b43628fd973 /cmds-replace.c
parentb570afae4d5648dd8edfab62e84a8fd987ff1f67 (diff)
btrfs-progs: inspect: use btrfs_open_dir for btrfs inspect 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 inspect-internal rootid /mnt/tmp1 ERROR: Failed to lookup root id - Inappropriate ioctl for device btrfs inspect-internal rootid: rootid failed with ret=-1 # ./btrfs inspect-internal inode-resolve 256 /mnt/tmp1 ioctl ret=-1, error: Inappropriate ioctl for device # ./btrfs inspect-internal min-dev-size /mnt/tmp1 Error invoking tree search ioctl: Inappropriate ioctl for device After patch: # ./btrfs inspect-internal rootid /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs inspect-internal inode-resolve 256 /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 # ./btrfs inspect-internal min-dev-size /mnt/tmp1 ERROR: not a btrfs filesystem: /mnt/tmp1 Signed-off-by: Zhao Lei <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-replace.c')
0 files changed, 0 insertions, 0 deletions