md: set the md raid 4,5,6 thead name by its level
PATCH 1/1 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 <[email protected]>
--- drivers/md/raid5.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/md/raid5.c +5 -2
@@ -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; }
Signature · 1 line
1.6.1.3