md: report failure if a 'set faulty' request doesn't.
authorNeilBrown <neilb@suse.de>
Thu, 25 Aug 2011 04:42:51 +0000 (14:42 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 25 Aug 2011 04:42:51 +0000 (14:42 +1000)
commit5ef56c8fecedf403a346d02140e52a072d693d6b
tree1f121fe5e4db61364c352e7ffe2293a1cc20e9a9
parent14c62e78dc1379185515be41903c4a667efc6d54
md: report failure if a 'set faulty' request doesn't.

Sometimes a device will refuse to be set faulty.  e.g. RAID1 will
never let the last working device become faulty.

So check if "md_error()" did manage to set the faulty flag and fail
with EBUSY if it didn't.

Resolves-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601198
Reported-by: Mike Hommey <mh+reportbug@glandium.org>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c