kernel-hacking-2024-linux-s.../drivers/md
Jonathan Brassow f44db678ed dm raid1: handle resync failures
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>
2007-07-12 15:01:08 -07:00
..
raid6test
.gitignore
bitmap.c md: don't write more than is required of the last page of a bitmap 2007-05-23 20:14:14 -07:00
dm-bio-list.h dm: bio_list prefetch removal 2007-07-12 15:01:08 -07:00
dm-bio-record.h
dm-crypt.c dm: disable barriers 2007-07-12 15:01:08 -07:00
dm-delay.c dm delay: cleanup 2007-07-12 15:01:08 -07:00
dm-emc.c
dm-exception-store.c dm snapshot: permit invalid activation 2007-07-12 15:01:08 -07:00
dm-hw-handler.c
dm-hw-handler.h dm mpath: log device name 2007-05-09 12:30:46 -07:00
dm-io.c dm io: fix panic on large request 2007-07-12 15:01:08 -07:00
dm-io.h dm io: remove old interface 2007-05-09 12:30:47 -07:00
dm-ioctl.c
dm-linear.c
dm-log.c dm log: fix resume failed log device 2007-05-09 12:30:48 -07:00
dm-log.h
dm-mpath.c dm: disable barriers 2007-07-12 15:01:08 -07:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c dm raid1: handle resync failures 2007-07-12 15:01:08 -07:00
dm-round-robin.c dm: remove duplicate module name from error msgs 2007-07-12 15:01:08 -07:00
dm-snap.c dm: disable barriers 2007-07-12 15:01:08 -07:00
dm-snap.h dm: use kmem_cache macro 2007-07-12 15:01:08 -07:00
dm-stripe.c
dm-table.c dm: allow offline devices 2007-05-09 12:30:47 -07:00
dm-target.c
dm-zero.c
dm.c dm: disable barriers 2007-07-12 15:01:08 -07:00
dm.h dm: add ratelimit logging macros 2007-07-12 15:01:08 -07:00
faulty.c
Kconfig dm: delay target 2007-05-09 12:30:47 -07:00
kcopyd.c dm: use kmem_cache macro 2007-07-12 15:01:08 -07:00
kcopyd.h
linear.c md: fix bug with linear hot-add and elsewhere 2007-05-23 20:14:14 -07:00
Makefile dm: delay target 2007-05-09 12:30:47 -07:00
md.c md: fix bug with linear hot-add and elsewhere 2007-05-23 20:14:14 -07:00
mktables.c
multipath.c
raid0.c md: avoid overflow in raid0 calculation with large components 2007-05-23 20:14:14 -07:00
raid1.c md: fix bug in error handling during raid1 repair 2007-06-16 13:16:15 -07:00
raid5.c Revert "md: improve partition detection in md array" 2007-05-09 18:51:36 -07:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c md: fix two raid10 bugs 2007-06-16 13:16:15 -07:00
unroll.pl
xor.c