public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] md/raid1: introduce a new sync action to repair badblocks
@ 2025-12-31  7:09 Zheng Qixing
  2025-12-31  7:09 ` [RFC PATCH 1/5] md: add helpers for requested sync action Zheng Qixing
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Zheng Qixing @ 2025-12-31  7:09 UTC (permalink / raw)
  To: song, yukuai
  Cc: linux-raid, linux-kernel, yi.zhang, yangerkun, houtao1,
	zhengqixing, linan122

From: Zheng Qixing <zhengqixing@huawei.com>

In RAID1, some sectors may be marked as bad blocks due to I/O errors.
In certain scenarios, these bad blocks might not be permanent, and
issuing I/Os again could succeed.

To address this situation, a new sync action ('rectify') introduced
into RAID1 , allowing users to actively trigger the repair of existing
bad blocks and clear it in sys bad_blocks.

When echo rectify into /sys/block/md*/md/sync_action, a healthy disk is
selected from the array to read data and then writes it to the disk where
the bad block is located. If the write request succeeds, the bad block
record can be cleared.

Note:
  This patchset depends on [1] from Li Nan which is currently under review
  and not yet merged into md-6.19.

[1] [PATCH v3 00/13] cleanup and bugfix of sync
  Link: https://lore.kernel.org/all/20251215030444.1318434-1-linan666@huaweicloud.com/

Zheng Qixing (5):
  md: add helpers for requested sync action
  md: clear stale sync flags when frozen before sync starts
  md: simplify sync action print in status_resync
  md: introduce MAX_RAID_DISKS macro to replace magic number
  md/raid1: introduce rectify action to repair badblocks

 drivers/md/md.c    | 184 ++++++++++++++++++++++-----
 drivers/md/md.h    |  17 +++
 drivers/md/raid1.c | 308 ++++++++++++++++++++++++++++++++++++++++++++-
 drivers/md/raid1.h |   1 +
 4 files changed, 472 insertions(+), 38 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-01-19  3:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31  7:09 [RFC PATCH 0/5] md/raid1: introduce a new sync action to repair badblocks Zheng Qixing
2025-12-31  7:09 ` [RFC PATCH 1/5] md: add helpers for requested sync action Zheng Qixing
2026-01-06 12:59   ` Li Nan
2026-01-08  3:31     ` Zheng Qixing
2025-12-31  7:09 ` [RFC PATCH 2/5] md: clear stale sync flags when frozen before sync starts Zheng Qixing
2026-01-06 13:07   ` Li Nan
2025-12-31  7:09 ` [RFC PATCH 3/5] md: simplify sync action print in status_resync Zheng Qixing
2026-01-06 13:24   ` Li Nan
2025-12-31  7:09 ` [RFC PATCH 4/5] md: introduce MAX_RAID_DISKS macro to replace magic number Zheng Qixing
2025-12-31 18:00   ` John Stoffel
2026-01-04  2:06     ` Zheng Qixing
2025-12-31  7:09 ` [RFC PATCH 5/5] md/raid1: introduce rectify action to repair badblocks Zheng Qixing
2026-01-06 13:43   ` Li Nan
2026-01-19  2:51     ` Zheng Qixing
2026-01-14  3:11   ` Li Nan
2026-01-19  3:06     ` Zheng Qixing
2025-12-31 11:11 ` [RFC PATCH 0/5] md/raid1: introduce a new sync " Roman Mamedov
2026-01-06  2:44   ` Zheng Qixing
2026-01-06 13:50     ` Roman Mamedov
2026-01-06 15:36     ` Pascal Hambourg
2026-01-08  1:32       ` Zheng Qixing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox