since idea is to scan and report all the sb in the
dev, we should let it so look for backup SB by setting
the flag BTRFS_SCAN_BACKUP_SB
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
find-root.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/find-root.c b/find-root.c
index 27512df..e4ad6ac 100644
--- a/find-root.c
+++ b/find-root.c
@@ -103,7 +103,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
ret = btrfs_scan_one_device(fd, device, &fs_devices,
&total_devs, BTRFS_SUPER_INFO_OFFSET,
- 0ull);
+ BTRFS_SCAN_BACKUP_SB);
if (ret) {
fprintf(stderr, "No valid Btrfs found on %s\n", device);
@@ -153,7 +153,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
disk_super = fs_info->super_copy;
ret = btrfs_read_dev_super(fs_devices->latest_bdev,
disk_super, BTRFS_SUPER_INFO_OFFSET,
- 0ull);
+ BTRFS_SCAN_BACKUP_SB);
if (ret) {
printk("No valid btrfs found\n");
goto out_devices;
--
1.8.1.227.g44fe835
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html