aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-09-23 04:09:45 -0400
committerNeilBrown <neilb@suse.de>2009-09-23 04:09:45 -0400
commit0da3c6194ec2f32617b272df4505a1cf022faea5 (patch)
tree5864b61b8fac2e7477668bdb9a493d2a64d0b3dd /drivers/md/raid5.c
parentee305acef5c7841dc25cc32e84bb94f744e1e9b9 (diff)
md: Improve name of threads created by md_register_thread
The management thread for raid4,5,6 arrays are all called mdX_raid5, independent of the actual raid level, which is wrong and can be confusion. So change md_register_thread to use the name from the personality unless no alternate name (like 'resync' or 'reshape') is given. This is simpler and more correct. Cc: Jinzc <zhenchengjin@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 763dcc40e513..bee3573ed1bd 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4448,7 +4448,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4448 printk(KERN_INFO "raid5: allocated %dkB for %s\n", 4448 printk(KERN_INFO "raid5: allocated %dkB for %s\n",
4449 memory, mdname(mddev)); 4449 memory, mdname(mddev));
4450 4450
4451 conf->thread = md_register_thread(raid5d, mddev, "%s_raid5"); 4451 conf->thread = md_register_thread(raid5d, mddev, NULL);
4452 if (!conf->thread) { 4452 if (!conf->thread) {
4453 printk(KERN_ERR 4453 printk(KERN_ERR
4454 "raid5: couldn't allocate thread for %s\n", 4454 "raid5: couldn't allocate thread for %s\n",
@@ -4614,7 +4614,7 @@ static int run(mddev_t *mddev)
4614 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 4614 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery);
4615 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 4615 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
4616 mddev->sync_thread = md_register_thread(md_do_sync, mddev, 4616 mddev->sync_thread = md_register_thread(md_do_sync, mddev,
4617 "%s_reshape"); 4617 "reshape");
4618 } 4618 }
4619 4619
4620 /* read-ahead size must cover two whole stripes, which is 4620 /* read-ahead size must cover two whole stripes, which is
@@ -5032,7 +5032,7 @@ static int raid5_start_reshape(mddev_t *mddev)
5032 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 5032 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery);
5033 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 5033 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
5034 mddev->sync_thread = md_register_thread(md_do_sync, mddev, 5034 mddev->sync_thread = md_register_thread(md_do_sync, mddev,
5035 "%s_reshape"); 5035 "reshape");
5036 if (!mddev->sync_thread) { 5036 if (!mddev->sync_thread) {
5037 mddev->recovery = 0; 5037 mddev->recovery = 0;
5038 spin_lock_irq(&conf->device_lock); 5038 spin_lock_irq(&conf->device_lock);