aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-find-root.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2013-09-18 16:27:34 +0800
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:22:26 -0400
commit77801d34d02e04ea4d5344415015a2ce84e0b653 (patch)
tree6808d39403622ac4129d2090aa02ef7bdeb07e58 /btrfs-find-root.c
parente353813b7c7ce23d1dfa6dbc29426843ea5f8382 (diff)
downloadbtrfs-progs-77801d34d02e04ea4d5344415015a2ce84e0b653.tar.gz
btrfs-progs-77801d34d02e04ea4d5344415015a2ce84e0b653.tar.xz
btrfs-progs-77801d34d02e04ea4d5344415015a2ce84e0b653.zip
Btrfs-progs: pass flag to control whether run ioctl in btrfs_scan_for_fsid()
If some fatal superblocks are damaged, running ioctl will return failure, in this case, we should avoid run ioctl. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'btrfs-find-root.c')
-rw-r--r--btrfs-find-root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-find-root.c b/btrfs-find-root.c
index b48c800..7572f52 100644
--- a/btrfs-find-root.c
+++ b/btrfs-find-root.c
@@ -82,7 +82,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
return NULL;
}
- ret = btrfs_scan_fs_devices(fd, device, &fs_devices, 0);
+ ret = btrfs_scan_fs_devices(fd, device, &fs_devices, 0, 1);
if (ret)
goto out;