diff options
author | NeilBrown <neilb@suse.de> | 2006-11-03 07:06:57 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-03 21:27:55 +0100 |
commit | 7870db4c7fa1b03fec133c4f4e67fdaa04c5ac15 (patch) | |
tree | 90b821219d4841c8f77b2e0116a3460a0e71a13e /drivers/md | |
parent | [PATCH] tidy "md: check bio address after mapping through partitions" (diff) | |
download | linux-7870db4c7fa1b03fec133c4f4e67fdaa04c5ac15.tar.xz linux-7870db4c7fa1b03fec133c4f4e67fdaa04c5ac15.zip |
[PATCH] md: send online/offline uevents when an md array starts/stops
This allows udev to do something intelligent when an array becomes
available.
Acked-by: Greg KH <greg@kroah.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 50ab4a936e30..d11135604403 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3200,6 +3200,7 @@ static int do_md_run(mddev_t * mddev) mddev->changed = 1; md_new_event(mddev); + kobject_uevent(&mddev->gendisk->kobj, KOBJ_ONLINE); return 0; } @@ -3313,6 +3314,7 @@ static int do_md_stop(mddev_t * mddev, int mode) module_put(mddev->pers->owner); mddev->pers = NULL; + kobject_uevent(&mddev->gendisk->kobj, KOBJ_OFFLINE); if (mddev->ro) mddev->ro = 0; } |