@@ -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;
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@oracle.com> --- find-root.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)