diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 00:20:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 08:34:05 -0800 |
commit | d7603b7e3a7f802c67f9190b2387d4d5d111ec14 (patch) | |
tree | 7fc644f33bd6d77156387f8acddd65030b1a817d /security/keys | |
parent | 0eb3ff12aa8a12538ef681dc83f4361636a0699f (diff) | |
download | kernel_samsung_aries-d7603b7e3a7f802c67f9190b2387d4d5d111ec14.zip kernel_samsung_aries-d7603b7e3a7f802c67f9190b2387d4d5d111ec14.tar.gz kernel_samsung_aries-d7603b7e3a7f802c67f9190b2387d4d5d111ec14.tar.bz2 |
[PATCH] md: make /proc/mdstat pollable
With this patch it is possible to poll /proc/mdstat to detect arrays appearing
or disappearing, to detect failures, recovery starting, recovery completing,
and devices being added and removed.
It is similar to the poll-ability of /proc/mounts, though different in that:
We always report that the file is readable (because face it, it is, even if
only for EOF).
We report POLLPRI when there is a change so that select() can detect
it as an exceptional event. Not only are these exceptional events, but
that is the mechanism that the current 'mdadm' uses to watch for events
(It also polls after a timeout).
(We also report POLLERR like /proc/mounts).
Finally, we only reset the per-file event counter when the start of the file
is read, rather than when poll() returns an event. This is more robust as it
means that an fd will continue to report activity to poll/select until the
program clearly responds to that activity.
md_new_event takes an 'mddev' which isn't currently used, but it will be soon.
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 'security/keys')
0 files changed, 0 insertions, 0 deletions