linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md: Add ability for disable bad block management
@ 2011-11-24 12:19 Adam Kwolek
  2011-11-24 12:23 ` Paul Menzel
  2011-11-30  0:14 ` NeilBrown
  0 siblings, 2 replies; 13+ messages in thread
From: Adam Kwolek @ 2011-11-24 12:19 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, ed.ciechanowski, marcin.labun, dan.j.williams

When external metadata doesn't support BBM, mdadm cannot answer correctly
for BBM requests. It causes reshape process being stopped.

Add ability for external metadata /mdadm/ to disable BBM via sysfs.
md will ignore bad blocks as it is for metadata v0.90.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---

 drivers/md/md.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 266e82e..6591108 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2935,7 +2935,16 @@ static ssize_t bb_show(struct md_rdev *rdev, char *page)
 }
 static ssize_t bb_store(struct md_rdev *rdev, const char *page, size_t len)
 {
-	int rv = badblocks_store(&rdev->badblocks, page, len, 0);
+	int rv;
+
+	/* disable bad blocks managment
+	 */
+	if (strstr(page, "disable") == page) {
+		bb->shift = -1;
+		return len;
+	}
+
+	rv = badblocks_store(&rdev->badblocks, page, len, 0);
 	/* Maybe that ack was all we needed */
 	if (test_and_clear_bit(BlockedBadBlocks, &rdev->flags))
 		wake_up(&rdev->blocked_wait);


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-12-09  3:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 12:19 [PATCH] md: Add ability for disable bad block management Adam Kwolek
2011-11-24 12:23 ` Paul Menzel
2011-11-24 12:28   ` Kwolek, Adam
2011-11-24 12:48     ` Paul Menzel
2011-11-30  0:14 ` NeilBrown
2011-11-30  8:17   ` Kwolek, Adam
2011-12-06  6:05     ` NeilBrown
2011-12-06 13:02       ` Kwolek, Adam
2011-12-07  1:52         ` NeilBrown
2011-12-07 11:10           ` Kwolek, Adam
2011-12-08  4:02             ` NeilBrown
2011-12-08 15:36               ` Kwolek, Adam
2011-12-09  3:53                 ` NeilBrown

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).