[PATCH 0/5] md/md-llbitmap: fixes and proactive parity building support

Yu Kuai posted 5 patches 1 month, 2 weeks ago
There is a newer version of this series
drivers/md/md-llbitmap.c | 213 +++++++++++++++++++++++++++++++++++----
drivers/md/md.c          | 109 +++++++++++++++++++-
2 files changed, 301 insertions(+), 21 deletions(-)
[PATCH 0/5] md/md-llbitmap: fixes and proactive parity building support
Posted by Yu Kuai 1 month, 2 weeks ago
This series contains fixes and enhancements for the md-llbitmap (lockless
bitmap) implementation.

Patches 1-2 are bug fixes:
- Patch 1 fixes bitmap data being read from spare disks that are not yet
  in sync, which could lead to incorrect dirty bit tracking.
- Patch 2 fixes a race condition where the state machine could transition
  before the barrier is properly raised.

Patch 3 improves compatibility with older mdadm versions by detecting
on-disk bitmap version and falling back to the correct bitmap_ops when
there's a version mismatch.

Patch 4 adds support for proactive XOR parity building in RAID-456 arrays.
This allows users to pre-build parity for unwritten regions via sysfs
before any user data is written, which can improve write performance for
workloads that will eventually use all storage. New states (CleanUnwritten,
NeedSyncUnwritten, SyncingUnwritten) are added to track these regions
separately from normal dirty/syncing states.

Patch 5 optimizes initial array sync for RAID-456 arrays on devices that
support write_zeroes with unmap. By zeroing all disks upfront, parity is
automatically consistent (0 XOR 0 = 0), allowing the bitmap to be
initialized to BitCleanUnwritten and skipping the initial sync entirely.
This significantly reduces array initialization time on modern NVMe SSDs.

Yu Kuai (5):
  md/md-llbitmap: skip reading rdevs that are not in_sync
  md/md-llbitmap: raise barrier before state machine transition
  md: add fallback to correct bitmap_ops on version mismatch
  md/md-llbitmap: add CleanUnwritten state for RAID-5 proactive parity
    building
  md/md-llbitmap: optimize initial sync with write_zeroes_unmap support

 drivers/md/md-llbitmap.c | 213 +++++++++++++++++++++++++++++++++++----
 drivers/md/md.c          | 109 +++++++++++++++++++-
 2 files changed, 301 insertions(+), 21 deletions(-)

-- 
2.51.0