linux-stable/Documentation/device-mapper
Heinz Mauelshagen c63ede3b42 dm raid: fix transient device failure processing
This fix addresses the following 3 failure scenarios:

1) If a (transiently) inaccessible metadata device is being passed into the
constructor (e.g. a device tuple '254:4 254:5'), it is processed as if
'- -' was given.  This erroneously results in a status table line containing
'- -', which mistakenly differs from what has been passed in.  As a result,
userspace libdevmapper puts the device tuple seperate from the RAID device
thus not processing the dependencies properly.

2) False health status char 'A' instead of 'D' is emitted on the status
status info line for the meta/data device tuple in this metadata device
failure case.

3) If the metadata device is accessible when passed into the constructor
but the data device (partially) isn't, that leg may be set faulty by the
raid personality on access to the (partially) unavailable leg.  Restore
tried in a second raid device resume on such failed leg (status char 'D')
fails after the (partial) leg returned.

Fixes for aforementioned failure scenarios:

- don't release passed in devices in the constructor thus allowing the
  status table line to e.g. contain '254:4 254:5' rather than '- -'

- emit device status char 'D' rather than 'A' for the device tuple
  with the failed metadata device on the status info line

- when attempting to restore faulty devices in a second resume, allow the
  device hot remove function to succeed by setting the device to not in-sync

In case userspace intentionally passes '- -' into the constructor to avoid that
device tuple (e.g. to split off a raid1 leg temporarily for later re-addition),
the status table line will correctly show '- -' and the status info line will
provide a '-' device health character for the non-defined device tuple.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2017-01-25 12:49:06 +01:00
..
cache-policies.txt dm cache: update cache-policies.txt now that mq is an alias for smq 2016-05-05 15:25:53 -04:00
cache.txt dm cache: display 'needs_check' in status if it is set 2015-07-16 10:23:50 -04:00
delay.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
dm-crypt.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-12-14 11:12:25 -08:00
dm-flakey.txt block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
dm-io.txt
dm-log.txt dm log userspace: fix comment hyphens 2011-10-31 20:21:22 +00:00
dm-queue-length.txt
dm-raid.txt dm raid: fix transient device failure processing 2017-01-25 12:49:06 +01:00
dm-service-time.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
dm-uevent.txt
era.txt dm: add era target 2014-03-27 16:56:23 -04:00
kcopyd.txt
linear.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
log-writes.txt block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH 2016-06-07 13:41:38 -06:00
persistent-data.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
snapshot.txt dm snapshot: add new persistent store option to support overflow 2015-10-09 16:57:03 -04:00
statistics.txt dm stats: fix spelling mistake in Documentation 2016-05-05 15:25:54 -04:00
striped.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
switch.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
thin-provisioning.txt dm thin: display 'needs_check' in status if it is set 2015-07-16 10:23:50 -04:00
verity.txt dm verity: add ignore_zero_blocks feature 2015-12-10 10:39:03 -05:00
zero.txt