linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FIX: Cleanup after raid45->raid0 takeover
@ 2011-03-28 13:31 Krzysztof Wojcik
  2011-04-07  1:18 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Wojcik @ 2011-03-28 13:31 UTC (permalink / raw)
  To: neilb
  Cc: linux-raid, wojciech.neubauer, adam.kwolek, dan.j.williams,
	ed.ciechanowski

Problem:
After raid4->raid0 takeover operation, another takeover operation
(e.g raid0->raid10) results "kernel oops".
Root cause:
Variables 'degraded' and 'plug' in mddev structure are not cleared
after raid45->raid0 takeover.

This patch reset these variables.

Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
---
 drivers/md/raid0.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index c0ac457..5d47113 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -603,6 +603,8 @@ static void *raid0_takeover_raid45(mddev_t *mddev)
 	mddev->new_chunk_sectors = mddev->chunk_sectors;
 	mddev->raid_disks--;
 	mddev->delta_disks = -1;
+	mddev->degraded = 0;
+	mddev->plug = NULL;
 	/* make sure it will be not marked as dirty */
 	mddev->recovery_cp = MaxSector;
 


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

end of thread, other threads:[~2011-04-07  1:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 13:31 [PATCH] FIX: Cleanup after raid45->raid0 takeover Krzysztof Wojcik
2011-04-07  1:18 ` 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).