This reverts commit 2b25000bf5157c28d8591f03f0575248a8cbd900. Justin provided a test case that can reliably trigger the md_write_start BUG_ON(mddev->ro == 1) at shutdown time. Kernels prior to 2.6.27 do not fail this test because the array remains readwrite. The block layer does not quiesce in-flight writes after setting the readonly flag so there will need to be new infrastructure (stop writes at shutdown), or support for barriers before MD arrays can reliably force readonly while writes may be in flight. Reported-by: Justin Maggard <jmaggard10@xxxxxxxxx> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> --- drivers/md/md.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 7ac2b56..d3640b8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6281,11 +6281,7 @@ static int md_notify_reboot(struct notifier_block *this, for_each_mddev(mddev, tmp) if (mddev_trylock(mddev)) { - /* Force a switch to readonly even array - * appears to still be in use. Hence - * the '100'. - */ - do_md_stop(mddev, 1, 100); + do_md_stop(mddev, 1, 0); mddev_unlock(mddev); } /* -- 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