aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-11-03 01:06:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-03 15:27:55 -0500
commit7870db4c7fa1b03fec133c4f4e67fdaa04c5ac15 (patch)
tree90b821219d4841c8f77b2e0116a3460a0e71a13e
parentdf66b8552be5fdab5c4b4d53ee08b99388b9bd02 (diff)
[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>
-rw-r--r--drivers/md/md.c2
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)
3200 3200
3201 mddev->changed = 1; 3201 mddev->changed = 1;
3202 md_new_event(mddev); 3202 md_new_event(mddev);
3203 kobject_uevent(&mddev->gendisk->kobj, KOBJ_ONLINE);
3203 return 0; 3204 return 0;
3204} 3205}
3205 3206
@@ -3313,6 +3314,7 @@ static int do_md_stop(mddev_t * mddev, int mode)
3313 3314
3314 module_put(mddev->pers->owner); 3315 module_put(mddev->pers->owner);
3315 mddev->pers = NULL; 3316 mddev->pers = NULL;
3317 kobject_uevent(&mddev->gendisk->kobj, KOBJ_OFFLINE);
3316 if (mddev->ro) 3318 if (mddev->ro)
3317 mddev->ro = 0; 3319 mddev->ro = 0;
3318 } 3320 }