Introduction
PATCH 1/1 Introduction
Following are two very trivial patches against 2.6.13-rc6. If 2.6.13 is still open for such trivial fixes, it would be good for them to go in, but if not, I won't loose any sleep over it.
The first arranges that the first open of /dev/mdX will auto-load the md modules (I don't know when that functionality disappeared). The second fixes a possibly problem where-by if you stop an array and create a new one on the same md device, it might not start any resync that might be needed.
Thanks,
NeilBrown
[PATCH md 001 of 2] Create a MODULE_ALIAS for md corresponding to it's block major number. [PATCH md 002 of 2] Clear the 'recovery' flags when starting an md array.
PATCH 1/1 Create a MODULE_ALIAS for md corresponding to it's block major number.
I just discoverred this is needed for module auto-loading.
### Diffstat output
./drivers/md/md.c | 1 + 1 files changed, 1 insertion(+)
drivers/md/md.c renamed from drivers/md/md.c~current~ +1 -0
@@ -4102,3 +4102,4 @@ EXPORT_SYMBOL(md_print_devices);EXPORT_SYMBOL (md_check_recovery);MODULE_LICENSE ("GPL" );MODULE_ALIAS ("md" ); +MODULE_ALIAS_BLOCKDEV_MAJOR (MD_MAJOR );
PATCH 1/1 Clear the 'recovery' flags when starting an md array.
In reply to NeilBrownIt possibly 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.
### Diffstat output
./drivers/md/md.c | 1 + 1 files changed, 1 insertion(+)
drivers/md/md.c renamed from drivers/md/md.c~current~ +1 -0
@@ -1701,6 +1701,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 */