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>
This commit is contained in:
NeilBrown
2009-09-23 18:09:45 +10:00
parent ee305acef5
commit 0da3c6194e
5 changed files with 12 additions and 9 deletions

View File

@@ -504,7 +504,7 @@ static int multipath_run (mddev_t *mddev)
}
{
mddev->thread = md_register_thread(multipathd, mddev, "%s_multipath");
mddev->thread = md_register_thread(multipathd, mddev, NULL);
if (!mddev->thread) {
printk(KERN_ERR "multipath: couldn't allocate thread"
" for %s\n", mdname(mddev));