From: Zhengyuan Liu Date: Sat, 26 Nov 2016 02:57:14 +0000 (+0800) Subject: raid5-cache: don't set STRIPE_R5C_PARTIAL_STRIPE flag while load stripe into cache X-Git-Tag: v4.14-rc1~1897^2^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=462eb7d87297dae5837f3445b68b79e835ab0d6c;p=platform%2Fkernel%2Flinux-rpi.git raid5-cache: don't set STRIPE_R5C_PARTIAL_STRIPE flag while load stripe into cache r5c_recovery_load_one_stripe should not set STRIPE_R5C_PARTIAL_STRIPE flag,as the data-only stripe may be STRIPE_R5C_FULL_STRIPE stripe. The state machine would release the stripe later and add it into neither r5c_cached_full_stripes list or r5c_cached_partial_stripes list and set correct flag. Reviewed-by: JackieLiu Signed-off-by: Zhengyuan Liu Signed-off-by: Shaohua Li --- diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 1ff3859b..b34b26d 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -1919,7 +1919,6 @@ r5c_recovery_analyze_meta_block(struct r5l_log *log, static void r5c_recovery_load_one_stripe(struct r5l_log *log, struct stripe_head *sh) { - struct r5conf *conf = sh->raid_conf; struct r5dev *dev; int i; @@ -1930,9 +1929,8 @@ static void r5c_recovery_load_one_stripe(struct r5l_log *log, set_bit(R5_UPTODATE, &dev->flags); } } - set_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state); - atomic_inc(&conf->r5c_cached_partial_stripes); list_add_tail(&sh->r5c, &log->stripe_in_journal_list); + atomic_inc(&log->stripe_in_journal_count); } /*