Journal doesn't support batch stripe. If journal is hotadded, there might be pending requests which are already batched. When journal is enabled, such requests should be skipped. Signed-off-by: Shaohua Li <shli@xxxxxx> --- drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index fcda2d2..560de57 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -453,7 +453,7 @@ int r5l_write_stripe(struct r5conf *conf, struct stripe_head *sh) return -EAGAIN; /* Don't support stripe batch */ if (sh->log_io || !test_bit(R5_Wantwrite, &sh->dev[sh->pd_idx].flags) || - test_bit(STRIPE_SYNCING, &sh->state)) { + test_bit(STRIPE_SYNCING, &sh->state) || sh->batch_head) { /* the stripe is written to log, we start writing it to raid */ clear_bit(STRIPE_LOG_TRAPPED, &sh->state); return -EAGAIN; -- 2.4.6 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html