[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1253089483-3862-1-git-send-email-zhenchengjin@gmail.com>
Date: Wed, 16 Sep 2009 16:24:43 +0800
From: Jinzc <zhenchengjin@...il.com>
To: NeilBrown <neilb@...e.de>
Cc: linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] md: set the md raid 4,5,6 thead name by its level
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists