Pawel Baldysiak c42d324099 md: return -ENODEV if rdev has no mddev assigned
Mdadm expects that setting drive as faulty will fail with -EBUSY only if
this operation will cause RAID to be failed. If this happens, it will
try to stop the array. Currently -EBUSY might also be returned if rdev
is in the middle of the removal process - for example there is a race
with mdmon that already requested the drive to be failed/removed.

If rdev does not contain mddev, return -ENODEV instead, so the caller
can distinguish between those two cases and behave accordingly.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
2019-04-16 09:31:21 -07:00
..
2019-03-08 14:12:17 -08:00
2019-04-15 08:14:19 -06:00
2016-11-01 09:43:26 -06:00
2017-06-09 09:27:32 -06:00
2018-10-11 11:36:09 -04:00
2018-10-18 09:41:25 -07:00
2019-04-01 12:11:48 -06:00
2019-03-08 14:12:17 -08:00
2019-03-12 10:15:18 -07:00
2019-03-16 12:36:39 -07:00
2019-03-12 10:04:02 -07:00