diff options
author | Pawel Baldysiak <pawel.baldysiak@intel.com> | 2019-03-27 13:48:21 +0100 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2019-04-16 09:31:21 -0700 |
commit | c42d3240990814eec1e4b2b93fa0487fc4873aed (patch) | |
tree | 01daefa659700d4d088696e3e4be9284280867a8 /drivers/md/raid5.c | |
parent | 2c88e3c7ec32d7a40cc7c9b4a487cf90e4671bdd (diff) | |
download | linux-c42d3240990814eec1e4b2b93fa0487fc4873aed.tar.gz |
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>
Diffstat (limited to 'drivers/md/raid5.c')
0 files changed, 0 insertions, 0 deletions