From 34a5ec12eedbd13f47c92108e4fb27e08598219a Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Tue, 3 Feb 2015 09:48:57 -0500 Subject: Btrfs-progs: skip opening all devices with restore When we go to fixup the dev items after a restore we scan all existing devices. If you happen to be a btrfs developer you could possibly open up some random device that you didn't just restore onto, which gives you weird errors and makes you super cranky and waste a day trying to figure out what is failing. This will make it so that we use the fd we've already opened for opening our ctree. Thanks, Signed-off-by: Josef Bacik --- btrfs-find-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'btrfs-find-root.c') diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 3edb8332..c6e6b82f 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -79,7 +79,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, 1); + ret = btrfs_scan_fs_devices(fd, device, &fs_devices, 0, 1, 0); if (ret) goto out; -- cgit v1.2.3