From: "Yu Kuai" <yukuai@fnnas.com>
To: "Su Yue" <l@damenly.org>
Cc: "Song Liu" <song@kernel.org>, <glass.su@suse.com>,
"Li Nan" <linan122@huawei.com>, "Xiao Ni" <xiao@kernel.org>,
<linux-raid@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yukuai@fnnas.com>
Subject: Re: [PATCH v13 0/3] md/md-bitmap: restore bitmap grow through sysfs
Date: Tue, 28 Apr 2026 16:21:39 +0800 [thread overview]
Message-ID: <5b303e36-51ed-46cf-aa0d-29240822e94b@fnnas.com> (raw)
In-Reply-To: <qzo35t50.fsf@damenly.org>
Hi,
在 2026/4/25 16:41, Su Yue 写道:
> On Sat 25 Apr 2026 at 10:46, Yu Kuai <yukuai@fnnas.com> wrote:
>
>> mdadm --grow adds an internal bitmap by writing bitmap/location for an
>> array that currently has no bitmap. That requires the bitmap directory
>> and location attribute to exist before the classic bitmap backend is
>> created.
>>
>> This series separates bitmap backend lifetime from bitmap sysfs
>> lifetime,
>> splits the sysfs layout into common and backend-specific groups, and
>> adds
>> a small "none" bitmap backend. The none backend keeps bitmap/location
>> available while no real bitmap is active, and the location store path
>> can
>> then switch between the none backend and the classic bitmap backend
>> without tearing down the common bitmap sysfs directory.
>>
>> Patch 1 factors bitmap creation and destruction into helpers that do not
>> touch sysfs registration.
>>
>> Patch 2 splits the classic bitmap sysfs files into a common group and an
>> internal-bitmap group, and converts bitmap backend operations to use a
>> sysfs group array.
>>
>> Patch 3 adds the none backend and uses it to restore mdadm --grow bitmap
>> addition through bitmap/location.
>>
>> Changes since v12:
>> - Keep the factoring patch focused on no-sysfs bitmap lifetime helpers.
>> - Make bitmap operation lookup depend only on the current bitmap id
>> matching the installed backend.
>> - Trim the none backend to only the operations required by the active
>> call paths.
>> - Rework bitmap/location error handling with explicit cleanup labels.
>> - Restore the none backend after bitmap removal and creation/load
>> failures so bitmap/location stays available.
>>
>> Validation:
>> - create a RAID1 array with --bitmap=none
>> - verify /sys/block/md0/md/bitmap/location exists and reports "none"
>> - mdadm --grow /dev/md0 --bitmap=internal
>> - verify location switches to "+8", mdadm reports "Intent Bitmap:
>> Internal", and /proc/mdstat reports a bitmap
>> - mdadm --grow /dev/md0 --bitmap=none
>> - verify location switches back to "none" and only the common
>> location
>> attribute remains under md/bitmap
>> - repeat the internal/none switch once more
>> - Checked the QEMU serial log for panic, Oops, BUG, WARNING, Call Trace,
>> RCU stall, and hung-task patterns; none were found.
>>
>> Yu Kuai (3):
>> md: factor bitmap creation away from sysfs handling
>> md/md-bitmap: split bitmap sysfs groups
>> md/md-bitmap: add a none backend for bitmap grow
>>
>
> Thanks for all.
> Would you like to add tag Fixes: fb8cc3b0d9db for the whole series
> while merging?
Sure, sorry that I forgot the fix tag.
>
> --
> Su
>
>> drivers/md/md-bitmap.c | 131 +++++++++++++++++++++++++++++++++++----
>> drivers/md/md-bitmap.h | 2 +-
>> drivers/md/md-llbitmap.c | 7 ++-
>> drivers/md/md.c | 125 ++++++++++++++++++++++++++-----------
>> drivers/md/md.h | 3 +
>> 5 files changed, 218 insertions(+), 50 deletions(-)
Applied with following fix tag for patch 3:
Fixes: fb8cc3b0d9db ("md/md-bitmap: delay registration of bitmap_ops until creating bitmap")
>>
>> base-commit: c85d314b135ff569c1031f2ef8e40368bcfe72ac
--
Thansk,
Kuai
prev parent reply other threads:[~2026-04-28 8:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 2:46 [PATCH v13 0/3] md/md-bitmap: restore bitmap grow through sysfs Yu Kuai
2026-04-25 2:46 ` [PATCH v13 1/3] md: factor bitmap creation away from sysfs handling Yu Kuai
2026-04-25 8:30 ` Su Yue
2026-04-25 2:46 ` [PATCH v13 2/3] md/md-bitmap: split bitmap sysfs groups Yu Kuai
2026-04-25 8:36 ` Su Yue
2026-04-25 2:46 ` [PATCH v13 3/3] md/md-bitmap: add a none backend for bitmap grow Yu Kuai
2026-04-25 8:39 ` Su Yue
2026-04-25 2:49 ` [PATCH v13 0/3] md/md-bitmap: restore bitmap grow through sysfs Yu Kuai
2026-04-25 8:41 ` Su Yue
2026-04-28 8:21 ` 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=5b303e36-51ed-46cf-aa0d-29240822e94b@fnnas.com \
--to=yukuai@fnnas.com \
--cc=glass.su@suse.com \
--cc=l@damenly.org \
--cc=linan122@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--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