summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-11-14 17:45:42 +0800
committerMiao Xie <miaox@cn.fujitsu.com>2014-12-03 10:18:46 +0800
commit7603597690147a16b5cc77047d7570fa22a22673 (patch)
tree6fc1618acba90230ea06986eee104c962475795a /fs/btrfs/scrub.c
parent2c8cdd6ee4e7f637b0486c6798117e7859dee586 (diff)
Btrfs, replace: write raid56 parity into the replace target device
This function reused the code of parity scrub, and we just write the right parity or corrected parity into the target device before the parity scrub end. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 7f95afcf9fd3..0ae837fd676d 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2714,7 +2714,7 @@ static void scrub_parity_check_and_repair(struct scrub_parity *sparity)
goto out;
length = sparity->logic_end - sparity->logic_start + 1;
- ret = btrfs_map_sblock(sctx->dev_root->fs_info, REQ_GET_READ_MIRRORS,
+ ret = btrfs_map_sblock(sctx->dev_root->fs_info, WRITE,
sparity->logic_start,
&length, &bbio, 0, &raid_map);
if (ret || !bbio || !raid_map)