diff options
-rw-r--r-- | fs/btrfs/scrub.c | 6 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 6 | ||||
-rw-r--r-- | fs/btrfs/volumes.h | 3 |
3 files changed, 6 insertions, 9 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index f499ed782671..fe1c793877dd 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -1331,7 +1331,7 @@ static int scrub_setup_recheck_block(struct scrub_block *original_sblock, | |||
1331 | * represents one mirror | 1331 | * represents one mirror |
1332 | */ | 1332 | */ |
1333 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_GET_READ_MIRRORS, | 1333 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_GET_READ_MIRRORS, |
1334 | logical, &mapped_length, &bbio, 0, 1); | 1334 | logical, &mapped_length, &bbio); |
1335 | if (ret || !bbio || mapped_length < sublen) { | 1335 | if (ret || !bbio || mapped_length < sublen) { |
1336 | btrfs_put_bbio(bbio); | 1336 | btrfs_put_bbio(bbio); |
1337 | return -EIO; | 1337 | return -EIO; |
@@ -2192,7 +2192,7 @@ static void scrub_missing_raid56_pages(struct scrub_block *sblock) | |||
2192 | int i; | 2192 | int i; |
2193 | 2193 | ||
2194 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, | 2194 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, |
2195 | &length, &bbio, 0, 1); | 2195 | &length, &bbio); |
2196 | if (ret || !bbio || !bbio->raid_map) | 2196 | if (ret || !bbio || !bbio->raid_map) |
2197 | goto bbio_out; | 2197 | goto bbio_out; |
2198 | 2198 | ||
@@ -2780,7 +2780,7 @@ static void scrub_parity_check_and_repair(struct scrub_parity *sparity) | |||
2780 | 2780 | ||
2781 | length = sparity->logic_end - sparity->logic_start; | 2781 | length = sparity->logic_end - sparity->logic_start; |
2782 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_WRITE, sparity->logic_start, | 2782 | ret = btrfs_map_sblock(fs_info, BTRFS_MAP_WRITE, sparity->logic_start, |
2783 | &length, &bbio, 0, 1); | 2783 | &length, &bbio); |
2784 | if (ret || !bbio || !bbio->raid_map) | 2784 | if (ret || !bbio || !bbio->raid_map) |
2785 | goto bbio_out; | 2785 | goto bbio_out; |
2786 | 2786 | ||
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2e425a909125..3b3be8eba776 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -5952,11 +5952,9 @@ int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, | |||
5952 | /* For Scrub/replace */ | 5952 | /* For Scrub/replace */ |
5953 | int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, | 5953 | int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, |
5954 | u64 logical, u64 *length, | 5954 | u64 logical, u64 *length, |
5955 | struct btrfs_bio **bbio_ret, int mirror_num, | 5955 | struct btrfs_bio **bbio_ret) |
5956 | int need_raid_map) | ||
5957 | { | 5956 | { |
5958 | return __btrfs_map_block(fs_info, op, logical, length, bbio_ret, | 5957 | return __btrfs_map_block(fs_info, op, logical, length, bbio_ret, 0, 1); |
5959 | mirror_num, need_raid_map); | ||
5960 | } | 5958 | } |
5961 | 5959 | ||
5962 | int btrfs_rmap_block(struct btrfs_fs_info *fs_info, | 5960 | int btrfs_rmap_block(struct btrfs_fs_info *fs_info, |
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 9ee6b706db31..def39b5a8d9e 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -400,8 +400,7 @@ int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, | |||
400 | struct btrfs_bio **bbio_ret, int mirror_num); | 400 | struct btrfs_bio **bbio_ret, int mirror_num); |
401 | int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, | 401 | int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, |
402 | u64 logical, u64 *length, | 402 | u64 logical, u64 *length, |
403 | struct btrfs_bio **bbio_ret, int mirror_num, | 403 | struct btrfs_bio **bbio_ret); |
404 | int need_raid_map); | ||
405 | int btrfs_rmap_block(struct btrfs_fs_info *fs_info, | 404 | int btrfs_rmap_block(struct btrfs_fs_info *fs_info, |
406 | u64 chunk_start, u64 physical, u64 devid, | 405 | u64 chunk_start, u64 physical, u64 devid, |
407 | u64 **logical, int *naddrs, int *stripe_len); | 406 | u64 **logical, int *naddrs, int *stripe_len); |