diff options
author | Josef Bacik <jbacik@fb.com> | 2015-02-03 09:48:57 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2015-02-09 14:53:15 -0500 |
commit | 34a5ec12eedbd13f47c92108e4fb27e08598219a (patch) | |
tree | c11c54bc5f5fc737e50d8ed0a98c5175079f88a9 /super-recover.c | |
parent | c6b388ef2d2bf0f7ff8d87fe82cdeddb6427eb67 (diff) | |
download | btrfs-progs-34a5ec12eedbd13f47c92108e4fb27e08598219a.tar.gz |
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 <jbacik@fb.com>
Diffstat (limited to 'super-recover.c')
-rw-r--r-- | super-recover.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/super-recover.c b/super-recover.c index 197fc4b..e2c3129 100644 --- a/super-recover.c +++ b/super-recover.c @@ -279,7 +279,7 @@ int btrfs_recover_superblocks(const char *dname, } init_recover_superblock(&recover); - ret = btrfs_scan_fs_devices(fd, dname, &recover.fs_devices, 0, 1); + ret = btrfs_scan_fs_devices(fd, dname, &recover.fs_devices, 0, 1, 0); close(fd); if (ret) { ret = 1; |