forked from Minki/linux
f44db678ed
Device-mapper mirroring currently takes a best effort approach to recovery - failures during mirror synchronization are completely ignored. This means that regions are marked 'in-sync' and 'clean' and removed from the hash list. Future reads and writes that query the region will incorrectly interpret the region as in-sync. This patch handles failures during the recovery process. If a failure occurs, the region is marked as 'not-in-sync' (aka RH_NOSYNC) and added to a new list 'failed_recovered_regions'. Regions on the 'failed_recovered_regions' list are not marked as 'clean' upon removal from the list. Furthermore, if the DM_RAID1_HANDLE_ERRORS flag is set, the region is marked as 'not-in-sync'. This action prevents any future read-balancing from choosing an invalid device because of the 'not-in-sync' status. If "handle_errors" is not specified when creating a mirror (leaving the DM_RAID1_HANDLE_ERRORS flag unset), failures will be ignored exactly as they would be without this patch. This is to preserve backwards compatibility with user-space tools, such as 'pvmove'. However, since future read-balancing policies will rely on the correct sync status of a region, a user must choose "handle_errors" when using read-balancing. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
raid6test | ||
.gitignore | ||
bitmap.c | ||
dm-bio-list.h | ||
dm-bio-record.h | ||
dm-crypt.c | ||
dm-delay.c | ||
dm-emc.c | ||
dm-exception-store.c | ||
dm-hw-handler.c | ||
dm-hw-handler.h | ||
dm-io.c | ||
dm-io.h | ||
dm-ioctl.c | ||
dm-linear.c | ||
dm-log.c | ||
dm-log.h | ||
dm-mpath.c | ||
dm-mpath.h | ||
dm-path-selector.c | ||
dm-path-selector.h | ||
dm-raid1.c | ||
dm-round-robin.c | ||
dm-snap.c | ||
dm-snap.h | ||
dm-stripe.c | ||
dm-table.c | ||
dm-target.c | ||
dm-zero.c | ||
dm.c | ||
dm.h | ||
faulty.c | ||
Kconfig | ||
kcopyd.c | ||
kcopyd.h | ||
linear.c | ||
Makefile | ||
md.c | ||
mktables.c | ||
multipath.c | ||
raid0.c | ||
raid1.c | ||
raid5.c | ||
raid6.h | ||
raid6algos.c | ||
raid6altivec.uc | ||
raid6int.uc | ||
raid6mmx.c | ||
raid6recov.c | ||
raid6sse1.c | ||
raid6sse2.c | ||
raid6x86.h | ||
raid10.c | ||
unroll.pl | ||
xor.c |