From: Dan Williams <dan.j.williams@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 2/2] Revert "Restore force switch of md array to readonly at reboot time."
Date: Thu, 08 Jan 2009 00:24:43 -0700 [thread overview]
Message-ID: <20090108072443.9577.10920.stgit@dwillia2-linux.ch.intel.com> (raw)
In-Reply-To: <20090108072023.9577.3585.stgit@dwillia2-linux.ch.intel.com>
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@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
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);
}
/*
next prev parent reply other threads:[~2009-01-08 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 7:24 [RFC PATCH 0/2] a couple of readonly handling fixups Dan Williams
2009-01-08 7:24 ` [PATCH 1/2] md: set mddev readonly flag on blkdev BLKROSET ioctl Dan Williams
2009-01-08 7:24 ` Dan Williams [this message]
2009-01-18 23:07 ` [RFC PATCH 0/2] a couple of readonly handling fixups Neil Brown
2010-05-11 18:06 ` Dan Williams
2010-05-11 22:33 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090108072443.9577.10920.stgit@dwillia2-linux.ch.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).