Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "yu kuai" <yukuai@fygo.io>
To: "Song Liu" <song@kernel.org>, "yu kuai" <yukuai@fygo.io>
Cc: "Li Nan" <magiclinan@didiglobal.com>, "Xiao Ni" <xiao@kernel.org>,
	 "Mykola Marzhan" <mykola@meshstor.io>,
	"Su Yue" <glass.su@suse.com>,  <linux-raid@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 00/21] md/md-llbitmap: support reshape for RAID10 and RAID5
Date: Wed, 29 Jul 2026 23:30:37 +0800	[thread overview]
Message-ID: <d564abf6-dd0c-4d9a-b413-ce75ffd04752@fygo.io> (raw)
In-Reply-To: <cover.1785206690.git.yukuai@fygo.io>

Hi,

在 2026/7/28 16:49, Yu Kuai 写道:
> From: Yu Kuai <yukuai@fygo.io>
>
> Hi,
>
> This series adds llbitmap support for online reshape in RAID10 and RAID5.
>
> llbitmap has a different set of constraints from the existing bitmap code:
> there is one live bitmap instance, each bit state has richer semantics, and
> reshape can change the mapping from logical array ranges to bitmap ranges.
> The series therefore adds exact bitmap range mapping hooks, tracks old and
> new llbitmap geometry during reshape, remaps checkpointed bits as reshape
> progresses, and wires the reshape lifecycle into RAID10 and RAID5.
>
> The main rules are:
>
> 1. split bios at the reshape position before bitmap accounting, so one bio
>     is never accounted with mixed old/new geometry;
> 2. do not skip reshape ranges from stale llbitmap state, because reshape
>     progress is checkpointed by array metadata;
> 3. remap llbitmap bits when reshape progress is checkpointed;
> 4. reject llbitmap reshape if mddev->chunk_sectors shrinks, because the
>     effective data range represented by existing bitmap bits can shrink.
>
> The first patch fixes RAID5 bitmap stripe rounding before the exact mapping
> hooks are added, so the later RAID5 helper split starts from correct
> sector_t division semantics. The rest of the series prepares generic bitmap
> and llbitmap infrastructure, wires RAID10, and then wires RAID5 with exact
> old/new stripe mapping.

There are some real problems reported by sashiko review, will send v4 set soon.

>
> Changes since v2:
> - Fix RAID5 bitmap stripe rounding for non-power-of-two stripe widths in
>    patch 1.
> - Fix partial discard chunks being marked unwritten in patch 11.
> - Fix RAID5 writes past component size being skipped by llbitmap accounting
>    in patch 11.
> - Fix stopped reshape reassembly losing target llbitmap geometry in patch 9.
> - Fix the page-cache-grow patch using target-geometry fields before they are
>    introduced in patch 7.
>
> Changes since v1:
> - Add Reviewed-by tags from Su Yue.
> - Rename llbitmap_resize_chunks() to llbitmap_calculate_chunks().
> - Use an unsigned index in llbitmap_expand_pages() error cleanup.
> - Rebase on mdraid/md-7.2, including the mddev_bio_split_at_reshape_offset()
>    declaration needed by the RAID5 build reported by kernel test robot.
>
> Yu Kuai (21):
>    md/raid5: round bitmap stripes with sector division
>    md: add exact bitmap mapping and reshape hooks
>    md: skip bitmap accounting for empty write ranges
>    md: add helper to split bios at reshape offset
>    md/md-llbitmap: track bitmap sync_size explicitly
>    md/md-llbitmap: allocate page controls independently
>    md/md-llbitmap: grow the page cache in place for reshape
>    md/md-llbitmap: track target reshape geometry fields
>    md/md-llbitmap: finish reshape geometry
>    md/md-llbitmap: refuse reshape while llbitmap still needs sync
>    md/md-llbitmap: add reshape range mapping helpers
>    md/md-llbitmap: don't skip reshape ranges from bitmap state
>    md/md-llbitmap: remap checkpointed bits as reshape progresses
>    md/md-llbitmap: clamp state-machine walks to tracked bits
>    md/raid10: reject llbitmap reshape when md chunk shrinks
>    md/raid10: wire llbitmap reshape lifecycle
>    md/raid10: split reshape bios before bitmap accounting
>    md/raid5: add exact old and new llbitmap mapping helpers
>    md/raid5: reject llbitmap reshape when md chunk shrinks
>    md/raid5: wire llbitmap reshape lifecycle
>    md/raid5: split reshape bios before bitmap accounting
>
>   drivers/md/md-bitmap.c   |   8 +
>   drivers/md/md-bitmap.h   |   9 +
>   drivers/md/md-llbitmap.c | 659 ++++++++++++++++++++++++++++++++++++---
>   drivers/md/md.c          |  64 +++-
>   drivers/md/md.h          |   8 +
>   drivers/md/raid10.c      |  49 +++
>   drivers/md/raid5.c       | 123 ++++++--
>   7 files changed, 842 insertions(+), 78 deletions(-)
>
>
> base-commit: 55b77337bdd088c77461588e5ec094421b89911b

-- 
Thanks,
Kuai

      parent reply	other threads:[~2026-07-29 15:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  8:49 [PATCH v3 00/21] md/md-llbitmap: support reshape for RAID10 and RAID5 Yu Kuai
2026-07-28  8:49 ` [PATCH v3 01/21] md/raid5: round bitmap stripes with sector division Yu Kuai
2026-07-28  9:03   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 02/21] md: add exact bitmap mapping and reshape hooks Yu Kuai
2026-07-28  8:49 ` [PATCH v3 03/21] md: skip bitmap accounting for empty write ranges Yu Kuai
2026-07-28  8:49 ` [PATCH v3 04/21] md: add helper to split bios at reshape offset Yu Kuai
2026-07-28  9:03   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 05/21] md/md-llbitmap: track bitmap sync_size explicitly Yu Kuai
2026-07-28  9:16   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 06/21] md/md-llbitmap: allocate page controls independently Yu Kuai
2026-07-28  9:06   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 07/21] md/md-llbitmap: grow the page cache in place for reshape Yu Kuai
2026-07-28  9:09   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 08/21] md/md-llbitmap: track target reshape geometry fields Yu Kuai
2026-07-28  9:12   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 09/21] md/md-llbitmap: finish reshape geometry Yu Kuai
2026-07-28  9:14   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 10/21] md/md-llbitmap: refuse reshape while llbitmap still needs sync Yu Kuai
2026-07-28  9:12   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 11/21] md/md-llbitmap: add reshape range mapping helpers Yu Kuai
2026-07-28  9:11   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 12/21] md/md-llbitmap: don't skip reshape ranges from bitmap state Yu Kuai
2026-07-28  8:49 ` [PATCH v3 13/21] md/md-llbitmap: remap checkpointed bits as reshape progresses Yu Kuai
2026-07-28  9:06   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 14/21] md/md-llbitmap: clamp state-machine walks to tracked bits Yu Kuai
2026-07-28  9:13   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 15/21] md/raid10: reject llbitmap reshape when md chunk shrinks Yu Kuai
2026-07-28  9:15   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 16/21] md/raid10: wire llbitmap reshape lifecycle Yu Kuai
2026-07-28  9:22   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 17/21] md/raid10: split reshape bios before bitmap accounting Yu Kuai
2026-07-28  9:15   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 18/21] md/raid5: add exact old and new llbitmap mapping helpers Yu Kuai
2026-07-28  9:25   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 19/21] md/raid5: reject llbitmap reshape when md chunk shrinks Yu Kuai
2026-07-28  9:22   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 20/21] md/raid5: wire llbitmap reshape lifecycle Yu Kuai
2026-07-28  9:21   ` sashiko-bot
2026-07-28  8:49 ` [PATCH v3 21/21] md/raid5: split reshape bios before bitmap accounting Yu Kuai
2026-07-28  9:26   ` sashiko-bot
2026-07-29 15:30 ` yu kuai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d564abf6-dd0c-4d9a-b413-ce75ffd04752@fygo.io \
    --to=yukuai@fygo.io \
    --cc=glass.su@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=magiclinan@didiglobal.com \
    --cc=mykola@meshstor.io \
    --cc=song@kernel.org \
    --cc=xiao@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox