提交 4f54b0e9 编写于 作者: D Dan Williams 提交者: Linus Torvalds

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: NDan Williams <dan.j.williams@intel.com>
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 09a44cc1
...@@ -3691,6 +3691,8 @@ static int do_md_stop(mddev_t * mddev, int mode) ...@@ -3691,6 +3691,8 @@ static int do_md_stop(mddev_t * mddev, int mode)
module_put(mddev->pers->owner); module_put(mddev->pers->owner);
mddev->pers = NULL; mddev->pers = NULL;
/* tell userspace to handle 'inactive' */
sysfs_notify(&mddev->kobj, NULL, "array_state");
set_capacity(disk, 0); set_capacity(disk, 0);
mddev->changed = 1; mddev->changed = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册