diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-07-03 17:36:36 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-08-22 15:04:50 +0200 |
commit | 23d7f6d9dc0aa42e30fe9642b4e0876354d2c02e (patch) | |
tree | a4126379363d41fb397f73df5d532f65104d10f2 /volumes.h | |
parent | bc70abad8cddc344bef1378017d159139c89d4ba (diff) |
btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for super_recover.
Btrfs-progs superblock checksum check is somewhat too restricted for
super-recover, since current btrfs-progs will only read the 1st
superblock and if you need super-recover the 1st superblock is
possibly already damaged.
The fix is introducing super_recover parameter for
btrfs_read_dev_super() and callers to allow scan backup superblocks if
needed.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'volumes.h')
-rw-r--r-- | volumes.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -179,7 +179,7 @@ int btrfs_update_device(struct btrfs_trans_handle *trans, struct btrfs_device *device); int btrfs_scan_one_device(int fd, const char *path, struct btrfs_fs_devices **fs_devices_ret, - u64 *total_devs, u64 super_offset); + u64 *total_devs, u64 super_offset, int super_recover); int btrfs_num_copies(struct btrfs_mapping_tree *map_tree, u64 logical, u64 len); struct list_head *btrfs_scanned_uuids(void); int btrfs_add_system_chunk(struct btrfs_trans_handle *trans, |