All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md: Clear clevel whenever level is set.
Date: Tue, 17 Jan 2006 16:49:50 +1100	[thread overview]
Message-ID: <1060117054950.14851@suse.de> (raw)
In-Reply-To: 20060117164838.14832.patches@notabene

This patch fixes a little bug in 2.6.15-mm3
--

The 'level' of an md array can be set as either a number of a string.
When one is set, the other must be marked 'undefined'.
This wasn't being done in one place: where new arrays are created.

Result: if md1 is a raid1, it is stopped and a raid5 is created there,
it might still appear to be a raid1.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/md.c |    1 +
 1 file changed, 1 insertion(+)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2006-01-17 10:39:30.000000000 +1100
+++ ./drivers/md/md.c	2006-01-17 10:37:38.000000000 +1100
@@ -3392,6 +3392,7 @@ static int set_array_info(mddev_t * mdde
 	mddev->ctime         = get_seconds();
 
 	mddev->level         = info->level;
+	mddev->clevel[0]     = 0;
 	mddev->size          = info->size;
 	mddev->raid_disks    = info->raid_disks;
 	/* don't set md_minor, it is determined by which /dev/md* was

           reply	other threads:[~2006-01-17  5:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20060117164838.14832.patches@notabene>]

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=1060117054950.14851@suse.de \
    --to=neilb@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.