Re: [PATCH v3 16/21] md/raid10: wire llbitmap reshape lifecycle
[email protected] Tue, 28 Jul 2026 09:22:35 +0000
| Newsgroups | org.kernel.vger.linux-raid |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The `raid10_finish_reshape()` function hardcodes a check for `ID_LLBITMAP` before calling the polymorphic `reshape_finish` callback, bypassing the abstraction provided by `bitmap_ops`. -- --- Patch [16]: [PATCH v3 16/21] md/raid10: wire llbitmap reshape lifecycle --- commit 2d6aab72980238a6e16cc2a451989159951188f3 Author: Yu Kuai <[email protected]> md/raid10: wire llbitmap reshape lifecycle This commit wires up the llbitmap reshape lifecycle in the RAID10 subsystem. It prepares the bitmap before growing, checkpoints it before advancing the reshape position, and finishes the update when reshape completes. > diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c > index 1242b8d3bb6bd..e50e4adee389f 100644 > --- a/drivers/md/raid10.c > +++ b/drivers/md/raid10.c [ ... ] > @@ -5039,10 +5062,15 @@ static void end_reshape_request(struct r10bio *r10_bio) > static void raid10_finish_reshape(struct mddev *mddev) > { > struct r10conf *conf = mddev->private; > + bool llbitmap = mddev->bitmap_id == ID_LLBITMAP && > + md_bitmap_enabled(mddev, false); > > if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) > return; > > + if (llbitmap && mddev->bitmap_ops->reshape_finish) > + mddev->bitmap_ops->reshape_finish(mddev); > + [Severity: Low] This isn't a bug, but does this code unnecessarily hardcode a check for ID_LLBITMAP? It looks like this restricts the reshape_finish callback to llbitmap, bypassing the abstraction provided by the generic bitmap_ops interface. > if (mddev->delta_disks > 0) { > if (mddev->resync_offset > mddev->resync_max_sectors) { > mddev->resync_offset = mddev->resync_max_sectors; -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=16