diff options
author | Song Liu <songliubraving@fb.com> | 2016-05-23 17:25:06 -0700 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-05-25 21:26:07 -0700 |
commit | 4125758074279115346c1f17c986d24cd1ab799c (patch) | |
tree | 570917d42c4120ca40b27dd2229c82cefffc31a4 /drivers/md | |
parent | 2f7c3a18a2dc79ddf7b83ae199b099a675e1adb2 (diff) | |
download | linux-stable-4125758074279115346c1f17c986d24cd1ab799c.tar.gz linux-stable-4125758074279115346c1f17c986d24cd1ab799c.tar.bz2 linux-stable-4125758074279115346c1f17c986d24cd1ab799c.zip |
right meaning of PARITY_ENABLE_RMW and PARITY_PREFER_RMW
In current handle_stripe_dirtying, the code prefers rmw with
PARITY_ENABLE_RMW; while prefers rcw with PARITY_PREFER_RMW.
This patch reverses this behavior.
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 8959e6dd31dd..ad9e15a3ef51 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3600,7 +3600,7 @@ static void handle_stripe_dirtying(struct r5conf *conf, pr_debug("for sector %llu, rmw=%d rcw=%d\n", (unsigned long long)sh->sector, rmw, rcw); set_bit(STRIPE_HANDLE, &sh->state); - if ((rmw < rcw || (rmw == rcw && conf->rmw_level == PARITY_ENABLE_RMW)) && rmw > 0) { + if ((rmw < rcw || (rmw == rcw && conf->rmw_level == PARITY_PREFER_RMW)) && rmw > 0) { /* prefer read-modify-write, but need to get some data */ if (conf->mddev->queue) blk_add_trace_msg(conf->mddev->queue, @@ -3627,7 +3627,7 @@ static void handle_stripe_dirtying(struct r5conf *conf, } } } - if ((rcw < rmw || (rcw == rmw && conf->rmw_level != PARITY_ENABLE_RMW)) && rcw > 0) { + if ((rcw < rmw || (rcw == rmw && conf->rmw_level != PARITY_PREFER_RMW)) && rcw > 0) { /* want reconstruct write, but need to get some data */ int qread =0; rcw = 0; |