Skip to content

bad block list management for md and RAID1

NeilBrown linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16md: beginnings of bad block management.drivers/md/dm-raid456.c drivers/md/md.c drivers/md/md.h+475 -40 replies
2/16md/bad-block-log: add sysfs interface for accessing bad-block-log.drivers/md/md.c+124 -00 replies
3/16md: don't allow arrays to contain devices with bad blocks.drivers/md/raid1.c drivers/md/raid10.c drivers/md/raid5.c+22 -00 replies
4/16md: load/store badblock list from v1.x metadatadrivers/md/md.c drivers/md/md.h include/linux/raid/md_p.h+110 -110 replies
5/16md: reject devices with bad blocks and v0.90 metadata.drivers/md/md.c+4 -00 replies
6/16md/raid1: clean up read_balance.drivers/md/raid1.c+60 -840 replies
7/16md: simplify raid10 read_balancedrivers/md/raid10.c+48 -660 replies
8/16md/raid1: avoid reading from known bad blocks.drivers/md/raid1.c+167 -90 replies
9/16md/raid1: avoid reading known bad blocks during resyncdrivers/md/raid1.c+76 -210 replies
10/16md: add 'write_error' flag to component devices.drivers/md/md.c drivers/md/md.h+15 -00 replies
11/16md/multipath: discard ->working_disks in favour of ->degradeddrivers/md/multipath.c drivers/md/multipath.h+11 -120 replies
12/16md: make error_handler functions more uniform and correct.drivers/md/multipath.c drivers/md/raid5.c+41 -390 replies
13/16md: make it easier to wait for bad blocks to be acknowledged.drivers/md/md.c drivers/md/md.h drivers/md/raid1.c +2 more+63 -250 replies
14/16md/raid1: avoid writing to known-bad blocks on known-bad drives.drivers/md/raid1.c+112 -350 replies
15/16md/raid1: clear bad-block record when write succeeds.drivers/md/raid1.c drivers/md/raid1.h+63 -80 replies
16/16md/raid1: Handle write errors by updating badblock log.drivers/md/raid1.c drivers/md/raid1.h+100 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [md PATCH 00/16] bad block list management for md and RAID1

In the spirit of "release early" I thought I would post some patches that I have been working on lately.

Please don't try these on a system with valuable data - they are very early code and will probably do the wrong thing.

The goal of these patches is to add a 'bad block list' to each device and use it to allow us to fail single blocks rather than whole devices.

This is particularly useful in arrays will multiple redundancy (e.g. RAID6 or 3-device RAID1). In such cases, bad blocks in different places on different devices can leave an array that still has at-least single redundancy on all stripes. Without this support, such arrays could become non-fuinctional.

This is also a necessary preparation to being able to support 'hot-replace' where we build a new device while the old device is still in service. Such a process is only really needed if the old device is potentially faulty, and having the bad-block-list in place allows it to continue to provide the best service it can even when it cannot provide 100% service.

These patches have only seen limited testing, and are posted primarily for review rather than testing, though testing is always valuable, especially if you use the md/faulty module to simulate errors, or have a drive that provides you with real errors...

This series provides infrastructure and integration into raid1.c only. raid5.c and raid10.c support are still to be written.

NeilBrown

---

NeilBrown (16):
md: beginnings of bad block management. md/bad-block-log: add sysfs interface for accessing bad-block-log.
md: don't allow arrays to contain devices with bad blocks.
md: load/store badblock list from v1.x metadata
md: reject devices with bad blocks and v0.90 metadata. md/raid1: clean up read_balance.
md: simplify raid10 read_balance
md/raid1: avoid reading from known bad blocks. md/raid1: avoid reading known bad blocks during resync
md: add 'write_error' flag to component devices. md/multipath: discard ->working_disks in favour of ->degraded
md: make error_handler functions more uniform and correct.
md: make it easier to wait for bad blocks to be acknowledged. md/raid1: avoid writing to known-bad blocks on known-bad drives. md/raid1: clear bad-block record when write succeeds. md/raid1: Handle write errors by updating badblock log.

 drivers/md/dm-raid456.c   |    6 
 drivers/md/md.c           |  725 +++++++++++++++++++++++++++++++++++++++++++--
 drivers/md/md.h           |   76 ++++-
 drivers/md/multipath.c    |   60 ++--
 drivers/md/multipath.h    |    1 
 drivers/md/raid1.c        |  714 +++++++++++++++++++++++++++++++++++---------
 drivers/md/raid1.h        |   14 +
 drivers/md/raid10.c       |  123 ++++----
 drivers/md/raid5.c        |   48 ++-
 include/linux/raid/md_p.h |   13 +
 10 files changed, 1475 insertions(+), 305 deletions(-)
Signature · 1 line
Signature