dm raid: fix false -EBUSY when handling check/repair message
authorHeinz Mauelshagen <heinzm@redhat.com>
Tue, 18 Dec 2018 16:35:41 +0000 (17:35 +0100)
committerMike Snitzer <snitzer@redhat.com>
Tue, 18 Dec 2018 18:48:35 +0000 (13:48 -0500)
commit74694bcbdf7e28a5ad548cdda9ac56d30be00d13
tree44eabdc82e3b9ac13159650576f06c0b71f523f1
parent34743bfddef2c50af20234ae873324ca49320a55
dm raid: fix false -EBUSY when handling check/repair message

Sending a check/repair message infrequently leads to -EBUSY instead of
properly identifying an active resync.  This occurs because
raid_message() is testing recovery bits in a racy way.

Fix by calling decipher_sync_action() from raid_message() to properly
identify the idle state of the RAID device.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c