md: notify the 'degraded' sysfs attribute on failure.
authorNeilBrown <neilb@suse.de>
Sun, 8 Jan 2012 13:46:41 +0000 (00:46 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 10 Jan 2012 21:35:14 +0000 (08:35 +1100)
commitf2a371c5e74dd5685ab47effa4ac7b23b1fdaae5
treee1960be50588ef0a4461fa54609df7ebea95eac5
parent19d671695e1931ebfd75b2b888778201aefe35ca
md: notify the 'degraded' sysfs attribute on failure.

We currently only 'notify' changes to the 'degraded' attribute
when it decreases, not when it increases.

Notifying on failure is a little awkward as it happen in
interrupt context.
So instead, notify when we remove the failed device from the array,
which is very soon afterwards.

Reported-and-tested-by: Mikhail Balabin <mbalabin@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c