dm raid: enhance attempt_restore_of_faulty_devices() to support more devices
authorHeinz Mauelshagen <heinzm@redhat.com>
Tue, 9 Aug 2016 12:55:35 +0000 (14:55 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 16 Aug 2016 20:22:24 +0000 (16:22 -0400)
commita3c06a389751192fdcbcdd8bba57bdb856eafe68
treeb8bebb01e81cb0a22a19b5b04df0b8ae78b67dd1
parent31e10a41203dbc95e0c1e81ef49ad1773a50d4f9
dm raid: enhance attempt_restore_of_faulty_devices() to support more devices

attempt_restore_of_faulty_devices() is limited to 64 when it should support
the new maximum of 253 when identifying any failed devices. It clears any
revivable devices via an MD personality hot remove and add cylce to allow
for their recovery.

Address by using existing functions to retrieve and update all failed
devices' bitfield members in the dm raid superblocks on all RAID devices
and check for any devices to clear in it.

Whilst on it, don't call attempt_restore_of_faulty_devices() for any MD
personality not providing disk hot add/remove methods (i.e. raid0 now),
because such personalities don't support reviving of failed disks.

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