Skip to content

Commit

Permalink
[PATCH] md: send online/offline uevents when an md array starts/stops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Nov 3, 2006
1 parent df66b85 commit 7870db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7870db4

Please sign in to comment.