WSL2-Linux-Kernel/Documentation/device-mapper
Jonathan Brassow 41dcf197ad dm raid: fix incorrect status output at the end of a "recover" process
There are three important fields that indicate the overall health and
status of an array: dev_health, sync_ratio, and sync_action.  They tell
us the condition of the devices in the array, and the degree to which
the array is synchronized.

This commit fixes a condition that is reported incorrectly.  When a member
of the array is being rebuilt or a new device is added, the "recover"
process is used to synchronize it with the rest of the array.  When the
process is complete, but the sync thread hasn't yet been reaped, it is
possible for the state of MD to be:
 mddev->recovery = [ MD_RECOVERY_RUNNING MD_RECOVERY_RECOVER MD_RECOVERY_DONE ]
 curr_resync_completed = <max dev size> (but not MaxSector)
 and all rdevs to be In_sync.
This causes the 'array_in_sync' output parameter that is passed to
rs_get_progress() to be computed incorrectly and reported as 'false' --
or not in-sync.  This in turn causes the dev_health status characters to
be reported as all 'a', rather than the proper 'A'.

This can cause erroneous output for several seconds at a time when tools
will want to be checking the condition due to events that are raised at
the end of a sync process.  Fix this by properly calculating the
'array_in_sync' return parameter in rs_get_progress().

Also, remove an unnecessary intermediate 'recovery_cp' variable in
rs_get_progress().

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2017-10-05 16:21:30 -04:00
..
cache-policies.txt
cache.txt Documentation: device-mapper: cache.txt: Fix typos 2017-03-19 09:16:07 -06:00
delay.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
dm-crypt.txt dm crypt: optionally support larger encryption sector size 2017-03-24 15:54:21 -04:00
dm-flakey.txt
dm-integrity.txt dm integrity: support larger block sizes 2017-04-24 12:04:33 -04:00
dm-io.txt
dm-log.txt
dm-queue-length.txt
dm-raid.txt dm raid: fix incorrect status output at the end of a "recover" process 2017-10-05 16:21:30 -04:00
dm-service-time.txt
dm-uevent.txt
dm-zoned.txt dm zoned: drive-managed zoned block device target 2017-06-19 11:05:20 -04:00
era.txt
kcopyd.txt
linear.txt Documentation/device-mapper: s/getsize/getsz/ 2016-12-14 10:54:27 +01:00
log-writes.txt
persistent-data.txt
snapshot.txt
statistics.txt
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
verity.txt
zero.txt