linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinzc <zhenchengjin@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jinzc <zhenchengjin@gmail.com>
Subject: [PATCH] md: set the md raid 4,5,6  thead name by its level
Date: Wed, 16 Sep 2009 16:54:57 +0800	[thread overview]
Message-ID: <1253091297-3889-1-git-send-email-zhenchengjin@gmail.com> (raw)

the current edition, if you create a md raid 4,5,6
the name of md thread is mdx_raid5. If you create a raid 4,6
the name mdx_raid4, mdx_raid6 are better than mdx_raid5.

Signed-off-by: Jinzc <zhenchengjin@gmail.com>
---
 drivers/md/raid5.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index b8a2c5d..f78f711 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4334,6 +4334,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
 	int raid_disk, memory;
 	mdk_rdev_t *rdev;
 	struct disk_info *disk;
+	char thread_name[64];
 
 	if (mddev->new_level != 5
 	    && mddev->new_level != 4
@@ -4447,10 +4448,12 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
 		printk(KERN_INFO "raid5: allocated %dkB for %s\n",
 			memory, mdname(mddev));
 
-	conf->thread = md_register_thread(raid5d, mddev, "%s_raid5");
+	sprintf(thread_name, "%%s_raid%d", conf->level);
+	conf->thread = md_register_thread(raid5d, mddev, thread_name);
+
 	if (!conf->thread) {
 		printk(KERN_ERR
-		       "raid5: couldn't allocate thread for %s\n",
+		       "raid%d: couldn't allocate thread for %s\n", conf->level,
 		       mdname(mddev));
 		goto abort;
 	}
-- 
1.6.1.3

             reply	other threads:[~2009-09-16  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16  8:54 Jinzc [this message]
2009-09-17  1:36 ` [PATCH] md: set the md raid 4,5,6 thead name by its level Neil Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-09-16  8:24 Jinzc

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=1253091297-3889-1-git-send-email-zhenchengjin@gmail.com \
    --to=zhenchengjin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).