~ubuntu-branches/debian/jessie/btrfs-tools/jessie

« back to all changes in this revision

Viewing changes to disk-io.c

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-10-18 23:47:16 UTC
  • mfrom: (6.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20131018234716-ijvr3ugf5s0m6y4n
Tags: 0.19+20130705-3
Import patch by Shilong Wang to resolve btrfs-convert (Closes:
#724265) (LP: #1228302)

Show diffs side-by-side

added added

removed removed

Lines of Context:
909
909
}
910
910
 
911
911
int btrfs_scan_fs_devices(int fd, const char *path,
912
 
                          struct btrfs_fs_devices **fs_devices)
 
912
                          struct btrfs_fs_devices **fs_devices,
 
913
                          u64 sb_bytenr)
913
914
{
914
915
        u64 total_devs;
915
916
        int ret;
 
917
        if (!sb_bytenr)
 
918
                sb_bytenr = BTRFS_SUPER_INFO_OFFSET;
916
919
 
917
920
        ret = btrfs_scan_one_device(fd, path, fs_devices,
918
 
                                    &total_devs, BTRFS_SUPER_INFO_OFFSET);
 
921
                                    &total_devs, sb_bytenr);
919
922
        if (ret) {
920
923
                fprintf(stderr, "No valid Btrfs found on %s\n", path);
921
924
                return ret;
1001
1004
        if (restore)
1002
1005
                fs_info->on_restoring = 1;
1003
1006
 
1004
 
        ret = btrfs_scan_fs_devices(fp, path, &fs_devices);
 
1007
        ret = btrfs_scan_fs_devices(fp, path, &fs_devices, sb_bytenr);
1005
1008
        if (ret)
1006
1009
                goto out;
1007
1010