alistair23-linux/drivers/md
Bian Yu edfa1f651e raid5: Retry R5_ReadNoMerge flag when hit a read error.
Because of block layer merge, one bio fails will cause other bios
which belongs to the same request fails, so raid5_end_read_request
will record all these bios as badblocks.
If retry request with R5_ReadNoMerge flag to avoid bios merge,
badblocks can only record sector which is bad exactly.

test:
hdparm --yes-i-know-what-i-am-doing --make-bad-sector 300000 /dev/sdb
mdadm -C /dev/md0 -l5 -n3 /dev/sd[bcd] --assume-clean
mdadm /dev/md0 -f /dev/sdd
mdadm /dev/md0 -r /dev/sdd
mdadm --zero-superblock /dev/sdd
mdadm /dev/md0 -a /dev/sdd

1. Without this patch:
cat /sys/block/md0/md/rd*/bad_blocks
299776 256
299776 256

2. With this patch:
cat /sys/block/md0/md/rd*/bad_blocks
300000 8
300000 8

Signed-off-by: Bian Yu <bianyu@kedacom.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-11-19 15:18:24 +11:00
..
bcache bcache: Fixed incorrect order of arguments to bio_alloc_bioset() 2013-10-23 07:55:36 +01:00
persistent-data dm space map: optimise sm_ll_dec and sm_ll_inc 2013-08-23 09:02:14 -04:00
bitmap.c sysfs: clean up sysfs_get_dirent() 2013-09-26 15:33:18 -07:00
bitmap.h
dm-bio-prison.c
dm-bio-prison.h
dm-bio-record.h
dm-bufio.c drivers: convert shrinkers to new count/scan API 2013-09-10 18:56:32 -04:00
dm-bufio.h
dm-cache-block-types.h
dm-cache-metadata.c
dm-cache-metadata.h
dm-cache-policy-cleaner.c
dm-cache-policy-internal.h
dm-cache-policy-mq.c dm cache: avoid conflicting remove_mapping() in mq policy 2013-08-16 15:56:51 -04:00
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: eliminate holes in cache structure 2013-08-23 09:02:14 -04:00
dm-crypt.c dm: stop using WQ_NON_REENTRANT 2013-08-23 09:02:13 -04:00
dm-delay.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm flakey: correct ctr alloc failure mesg 2013-07-10 23:41:17 +01:00
dm-io.c dm: add reserved_bio_based_ios module parameter 2013-09-23 10:42:24 -04:00
dm-ioctl.c dm: add statistics support 2013-09-05 20:46:06 -04:00
dm-kcopyd.c dm: stop using WQ_NON_REENTRANT 2013-08-23 09:02:13 -04:00
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm: add reserved_rq_based_ios module parameter 2013-09-23 10:42:24 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c
dm-raid1.c dm: stop using WQ_NON_REENTRANT 2013-08-23 09:02:13 -04:00
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c dm snapshot: fix data corruption 2013-10-16 03:17:47 +01:00
dm-snap-transient.c
dm-snap.c dm-snapshot: fix performance degradation due to small hash size 2013-09-20 10:36:34 -04:00
dm-stats.c dm stats: fix possible counter corruption on 32-bit systems 2013-09-18 14:41:06 -04:00
dm-stats.h dm: add statistics support 2013-09-05 20:46:06 -04:00
dm-stripe.c dm stripe: silence a couple sparse warnings 2013-09-06 11:36:01 -04:00
dm-switch.c dm: add switch target 2013-07-10 23:41:19 +01:00
dm-sysfs.c
dm-table.c dm ioctl: increase granularity of type_lock when loading table 2013-09-05 20:46:06 -04:00
dm-target.c dm: allow error target to replace bio-based and request-based targets 2013-09-05 20:46:05 -04:00
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c dm thin: do not expose non-zero discard limits if discards disabled 2013-09-23 10:42:06 -04:00
dm-uevent.c
dm-uevent.h
dm-verity.c dm verity: use __ffs and __fls 2013-07-10 23:41:17 +01:00
dm-zero.c
dm.c dm: add reserved_bio_based_ios module parameter 2013-09-23 10:42:24 -04:00
dm.h dm: add reserved_bio_based_ios module parameter 2013-09-23 10:42:24 -04:00
faulty.c
Kconfig dm: add switch target 2013-07-10 23:41:19 +01:00
linear.c
linear.h
Makefile dm: add statistics support 2013-09-05 20:46:06 -04:00
md.c md: fix calculation of stacking limits on level change. 2013-11-14 15:16:15 +11:00
md.h sysfs: clean up sysfs_get_dirent() 2013-09-26 15:33:18 -07:00
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c md: Fix skipping recovery for read-only arrays. 2013-10-24 12:55:17 +11:00
raid1.h
raid5.c raid5: Retry R5_ReadNoMerge flag when hit a read error. 2013-11-19 15:18:24 +11:00
raid5.h raid5: relieve lock contention in get_active_stripe() 2013-11-19 15:18:22 +11:00
raid10.c md: Fix skipping recovery for read-only arrays. 2013-10-24 12:55:17 +11:00
raid10.h