From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Sophon Z via B4 Relay" <devnull+aiqubits.hotmail.com@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>
Cc: linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org, Sophon Z <aiqubits@hotmail.com>
Subject: Re: [PATCH] rust: block: Fix GenDiskBuilder block size documentation
Date: Mon, 31 Aug 2026 14:55:07 +0200 [thread overview]
Message-ID: <87ld9mxxec.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <20260831-fix-gendisk-block-size-docs-v1-1-900546005799@hotmail.com>
"Sophon Z via B4 Relay" <devnull+aiqubits.hotmail.com@kernel.org>
writes:
> From: Sophon Z <aiqubits@hotmail.com>
>
> GenDiskBuilder::validate_block_size() accepts powers of two from 512
> through PAGE_SIZE, but the documentation for logical_block_size() and
> physical_block_size() states that the maximum is 4096.
>
> Use PAGE_SIZE for both documented upper bounds so that the documentation
> matches validation on architectures with larger page sizes.
>
> Signed-off-by: Sophon Z <aiqubits@hotmail.com>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
@Jens, please pick this one.
@Sophon I'd like to call the C static inline `blk_validate_block_size`
here instead reproducing the check. Feel free to add a patch. You need
to add a helper in rust/helpers/blk.c to be able to call the function.
You would also need to update the documentation again, as the C function
has special handling when transparent huge pages are enabled. I would
suggest to just saying "check that the block size is valid".
Best regards,
Andreas Hindborg
next prev parent reply other threads:[~2026-08-31 12:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <eqzS1cYG2bYJ10oFrfX_D7UVNqb_NuK3wsMUUEXpdBj7yCtzD24WOzI8zIKg2FlD04VFp_R9xt65fGmEqpt6QA==@protonmail.internalid>
2026-08-31 3:47 ` Sophon Z via B4 Relay
2026-08-31 12:55 ` Andreas Hindborg [this message]
[not found] ` <SN7PR07MB9708ED760C7DDF833BEE80E1CFA82@SN7PR07MB9708.namprd07.prod.outlook.com>
2026-09-01 9:13 ` Miguel Ojeda
2026-09-01 9:42 ` 回复: " ai qubits
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=87ld9mxxec.fsf@t14s.mail-host-address-is-not-set \
--to=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aiqubits@hotmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=devnull+aiqubits.hotmail.com@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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
all inboxes | Powered by JetHome®