From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796267864; b=z/KhTaZk64kL9euOk77e0PQGrAG7zqRWTy/UpJSF29134IdIsf/b8usOvpm70QE59lLH a6v454jFR968cf4d0FCFqzbGOqIoZKe0YKjH6INSIoq/0eb5zlKMJCTwkQDllnuZTY+kk CKE9S9njOf5u582GXQV+EUUw62aSE+DNXttxDJHfIyhoyg4gUwzB+85nf98ARHcTUB95t s6YmL1/Ppy69SRymM9rXK5Jueow9NqFHejIQnoTQRG34MkZTSORSzDJjubzTIRVWI2RCZ d3yUMecmMy0FUbMKv/PBxqp75ugY7hwMuCTL6+M/KSTPL66KoSrISLzpOi/MsZ5cyOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796267864; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=3oIzvCL3krwan82WSnHYCnSyOnTM9CK5KGZJ1ipfKLs=; b=ZKQMPmIRRYZlD12t/BuND5YxfGVvZicvPyDtiqYL/LZeO4ytLGXWkOjfNQkWT3kzwNea ewUFdpV/4t9CH7L4FAwvwQvEWXhlkP9KB3n3D90KvmC28MOK3ff0OQQCgrwI57NH0gPMQ myaLaOHiGC85McQs4+EZijCezURftzFbDuO5jsN4l8AuZdVuSIHMrbjaSWaCdl6kbGHD2 PHMS6PtfvQNiFr+bComyyUXTSkOy6mZ7mqbDK5zUWYhYAUWW3vm8g07RK5mEzp7ftHBVA RZOPICSJWuFYkW32ff7ZSaGWmqUFUxMpOBrdMx1GagdtgjItbptrNvYy2QSi69Lz18A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SipGF9jk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 204DE606A322; Thu, 3 Dec 2026 03:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SipGF9jk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26E021F000C1; Thu, 3 Dec 2026 03:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796267863; bh=3oIzvCL3krwan82WSnHYCnSyOnTM9CK5KGZJ1ipfKLs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=SipGF9jk5eCx2zx0HDYu10LwKyOf3ja7lQlm4wOu8FvHv2Vjr0NHDdUA498GypnxT oAW7ySvPuev90Z1B/3rwrrPtJJ+IHtvhR1PWxzc62LZMJ3uSC2JbqMhBPgJYlOUv+8 pwBcJeuA2LbxBaxzNP4U0Q0A5FbxhYHYmIPdAkYSfIgjfVL0+nIi41uhc2KPzUngZA wO0xUw9tnbj+8xVuS+qEmuWrPDVp8hjEZ9OYM59ba4h43CLy+jWKdlFDjqQA9rqwwA V71GLJM3Ez4QgaeW3JhTETkAafEucGephyX/qodDWLqW5qYYNKA40O/kKTv9z+ZT+T YmtL6ah4lK8Kw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RFC PATCH v2 04/13] md: Remove compile-time PAGE_SIZE use in md, dm and bcache Reply-To: sashiko-reviews@lists.linux.dev To: "Eric Curtin" Cc: "Eric Curtin" , "Coly Li" , "Kent Overstreet" , "Alasdair Kergon" , "Mike Snitzer" , "Mikulas Patocka" , "Benjamin Marzinski" , "Matthew Sakai" , "Song Liu" , "Yu Kuai" , "Li Nan" , "Xiao Ni" , dm-devel@lists.linux.dev, linux-raid@vger.kernel.org In-Reply-To: <20261202031647.1690622-5-ericcurtin17@gmail.com> References: <20261202031647.1690622-1-ericcurtin17@gmail.com> <20261202031647.1690622-5-ericcurtin17@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 03:17:42 +0000 X-Mailing-List: linux-raid@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] md: undeclared PAGE_SIZE_MIN and PAGE_SIZE_MAX break build and raid5 -- commit 0a07d2a3191fb11978a042ddd22829ad375b5c83 Author: Eric Curtin md: Remove compile-time PAGE_SIZE use in md, dm and bcache This commit replaces compile-time uses of PAGE_SIZE and PAGE_SHIFT in bcache, dm-switch, dm-vdo, dm-writecache, raid1/10, and raid5 to support boot-time page size selection. > diff --git a/drivers/md/dm-vdo/data-vio.c b/drivers/md/dm-vdo/data-vio.c > index 370d4239ba315..fe0329354cfba 100644 > --- a/drivers/md/dm-vdo/data-vio.c > +++ b/drivers/md/dm-vdo/data-vio.c > @@ -785,7 +785,7 @@ static int initialize_data_vio(struct data_vio *data_= vio, struct vdo *vdo) > struct bio *bio; > int result; > =20 > - BUILD_BUG_ON(VDO_BLOCK_SIZE > PAGE_SIZE); > + BUILD_BUG_ON(VDO_BLOCK_SIZE > PAGE_SIZE_MIN); > result =3D vdo_allocate_memory(VDO_BLOCK_SIZE, 0, "data_vio data", > &data_vio->vio.data); > if (result !=3D VDO_SUCCESS) > diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c > index 341a9785e3f26..919de6611ee3a 100644 > --- a/drivers/md/raid1-10.c > +++ b/drivers/md/raid1-10.c > @@ -2,6 +2,7 @@ > /* Maximum size of each resync request */ > #define RESYNC_BLOCK_SIZE (64*1024) > #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE) > +#define RESYNC_PAGES_MAX ((RESYNC_BLOCK_SIZE + PAGE_SIZE_MIN-1) / PAGE_S= IZE_MIN) > =20 > /* when we get a read error on a read-only array, we redirect to another > * device without failing the first device, or trying to over-write to > @@ -21,7 +22,7 @@ > /* for managing resync I/O pages */ > struct resync_pages { > void *raid_bio; > - struct page *pages[RESYNC_PAGES]; > + struct page *pages[RESYNC_PAGES_MAX]; > }; > =20 > struct raid1_plug_cb { [ ... ] > diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h > index 94b3e2c947ba9..0f87b58a9a617 100644 > --- a/drivers/md/raid5.h > +++ b/drivers/md/raid5.h > @@ -197,6 +197,9 @@ enum reconstruct_states { > }; > =20 > #define DEFAULT_STRIPE_SIZE 4096 > +#if PAGE_SIZE_MIN !=3D DEFAULT_STRIPE_SIZE || PAGE_SIZE_MAX !=3D DEFAULT= _STRIPE_SIZE > +#define RAID5_VAR_STRIPE_SIZE > +#endif [Severity: High] Are PAGE_SIZE_MIN and PAGE_SIZE_MAX defined anywhere in the tree? Neither macro is defined in the headers, so compiling with CONFIG_DM_VDO, CONFIG_MD_RAID1, or CONFIG_MD_RAID10 fails with undeclared identifier errors in initialize_data_vio(), struct resync_pages, and process_checks(). In raid5.h, the #if directive evaluates both undefined identifiers to 0 (triggering -Wundef warnings, or build failures with CONFIG_WERROR), which unconditionally defines RAID5_VAR_STRIPE_SIZE even on architectures with a fixed 4096-byte PAGE_SIZE. That turns RAID5_STRIPE_SIZE(), RAID5_STRIPE_SHIFT(), and RAID5_STRIPE_SECTORS() into runtime loads from struct r5conf, allocates an extra sh->pages array per stripe_head in alloc_stripe(), and exposes a writable stripe_size sysfs attribute via raid5_store_stripe_size(). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202031647.1690= 622-1-ericcurtin17@gmail.com?part=3D4