If caching is enabled, the caching layer will guarantee data consistency, so skip resync for unclean shutdown Signed-off-by: Shaohua Li <shli@xxxxxx> --- drivers/md/raid5.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 53f582d..52e016f 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6941,6 +6941,13 @@ static int run(struct mddev *mddev) if (mddev->queue) blk_queue_logical_block_size(mddev->queue, STRIPE_SIZE); conf->skip_copy = 1; + + if (mddev->recovery_cp == 0) { + printk(KERN_NOTICE + "md/raid:%s: skip resync with caching enabled\n", + mdname(mddev)); + mddev->recovery_cp = MaxSector; + } } return 0; -- 1.8.1 -- 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