diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-05-23 16:04:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-24 12:56:10 -0400 |
commit | 4f54b0e9485644a3c5fca2ae43bcbe7376825747 (patch) | |
tree | 10033228aa5efc868c25aed924b5a0d6b98ac090 /drivers | |
parent | 09a44cc15079f80c1416cde1a1d5b2cdd8f2118a (diff) |
md: notify userspace on 'stop' events
This additional notification to 'array_state' is needed to allow the
monitor application to learn about stop events via sysfs. The
sysfs_notify("sync_action") call that comes at the end of do_md_stop()
(via md_new_event) is insufficient since the 'sync_action' attribute has
been removed by this point.
(Seems like a sysfs-notify-on-removal patch is a better fix. Currently
removal updates the event count but does not wake up waiters)
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-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 52f9865096c6..e57213dacd25 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3691,6 +3691,8 @@ static int do_md_stop(mddev_t * mddev, int mode) | |||
3691 | 3691 | ||
3692 | module_put(mddev->pers->owner); | 3692 | module_put(mddev->pers->owner); |
3693 | mddev->pers = NULL; | 3693 | mddev->pers = NULL; |
3694 | /* tell userspace to handle 'inactive' */ | ||
3695 | sysfs_notify(&mddev->kobj, NULL, "array_state"); | ||
3694 | 3696 | ||
3695 | set_capacity(disk, 0); | 3697 | set_capacity(disk, 0); |
3696 | mddev->changed = 1; | 3698 | mddev->changed = 1; |