From 72008652dae7d10fa668d7b2ada3bddff7403d86 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 26 Aug 2005 18:34:15 -0700 Subject: [PATCH] md: create a MODULE_ALIAS for md corresponding to its block major number. I just discovered this is needed for module auto-loading. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/md.c') diff --git a/drivers/md/md.c b/drivers/md/md.c index 486ee50..deccd56 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4011,3 +4011,4 @@ EXPORT_SYMBOL(md_print_devices); EXPORT_SYMBOL(md_check_recovery); MODULE_LICENSE("GPL"); MODULE_ALIAS("md"); +MODULE_ALIAS_BLOCKDEV_MAJOR(MD_MAJOR); -- cgit v1.1 From 657390d25d4241705cb4fc5b3b4ba5b30575dc17 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 26 Aug 2005 18:34:16 -0700 Subject: [PATCH] md: clear the 'recovery' flags when starting an md array. It's possible for this to still have flags in it and a previous instance has been stopped, and that confused the new array using the same mddev. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/md.c') diff --git a/drivers/md/md.c b/drivers/md/md.c index deccd56..20ca80b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1689,6 +1689,7 @@ static int do_md_run(mddev_t * mddev) mddev->pers = pers[pnum]; spin_unlock(&pers_lock); + mddev->recovery = 0; mddev->resync_max_sectors = mddev->size << 1; /* may be over-ridden by personality */ /* before we start the array running, initialise the bitmap */ -- cgit v1.1