* Re: [PATCH] rust: block: Fix GenDiskBuilder block size documentation
[not found] ` <SN7PR07MB9708ED760C7DDF833BEE80E1CFA82@SN7PR07MB9708.namprd07.prod.outlook.com>
@ 2026-09-01 9:13 ` Miguel Ojeda
2026-09-01 9:42 ` 回复: " ai qubits
1 sibling, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-09-01 9:13 UTC (permalink / raw)
To: ai qubits
Cc: Andreas Hindborg, Sophon Z via B4 Relay, Boqun Feng,
Miguel Ojeda, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, Daniel Almeida,
Tamir Duberstein, Alexandre Courbot, Onur Özkan,
linux-block, rust-for-linux, linux-kernel
On Tue, Sep 1, 2026 at 4:00 AM ai qubits <aiqubits@hotmail.com> wrote:
>
> Thanks for the review and the Ack.
>
> Understood. I will leave this documentation fix as-is for Jens to pick up
> and prepare a separate follow-up patch after it lands.
>
> The follow-up will add a helper in rust/helpers/blk.c for
> blk_validate_block_size(), use it from
> GenDiskBuilder::validate_block_size(), and update the documentation to
> avoid specifying a configuration-dependent upper bound.
Note: I don't think your messages will be accepted by the mailing
list, since they use HTML. Please switch to plain text -- thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread* 回复: [PATCH] rust: block: Fix GenDiskBuilder block size documentation
[not found] ` <SN7PR07MB9708ED760C7DDF833BEE80E1CFA82@SN7PR07MB9708.namprd07.prod.outlook.com>
2026-09-01 9:13 ` Miguel Ojeda
@ 2026-09-01 9:42 ` ai qubits
1 sibling, 0 replies; 4+ messages in thread
From: ai qubits @ 2026-09-01 9:42 UTC (permalink / raw)
To: Andreas Hindborg, Sophon Z via B4 Relay, Boqun Feng,
Miguel Ojeda, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, Daniel Almeida,
Tamir Duberstein, Alexandre Courbot, Onur Özkan
Cc: linux-block, rust-for-linux, linux-kernel
Thanks for the review and the Ack.
Understood. I will leave this documentation fix as-is for Jens to pick up
and prepare a separate follow-up patch after it lands.
The follow-up will add a helper in rust/helpers/blk.c for
blk_validate_block_size(), use it from
GenDiskBuilder::validate_block_size(), and update the documentation to
avoid specifying a configuration-dependent upper bound.
Best regards,
Sophon
// Reason for Resending
Note: I don't think your messages will be accepted by the mailing
list, since they use HTML. Please switch to plain text -- thanks!
Cheers,
Miguel
Hi Miguel,
Thanks for the reminder. I will resend it in plain text.
Best regards,
Sophon
________________________________________
发件人: ai qubits <aiqubits@hotmail.com>
发送时间: 2026年9月1日 10:00
收件人: Andreas Hindborg; Sophon Z via B4 Relay; Boqun Feng; Miguel Ojeda; Gary Guo; Björn Roy Baron; Benno Lossin; Alice Ryhl; Trevor Gross; Danilo Krummrich; Daniel Almeida; Tamir Duberstein; Alexandre Courbot; Onur Özkan
抄送: linux-block@vger.kernel.org; rust-for-linux@vger.kernel.org; linux-kernel@vger.kernel.org
主题: 回复: [PATCH] rust: block: Fix GenDiskBuilder block size documentation
Thanks for the review and the Ack.
Understood. I will leave this documentation fix as-is for Jens to pick up
and prepare a separate follow-up patch after it lands.
The follow-up will add a helper in rust/helpers/blk.c for
blk_validate_block_size(), use it from
GenDiskBuilder::validate_block_size(), and update the documentation to
avoid specifying a configuration-dependent upper bound.
Best regards,
Sophon
________________________________
发件人: Andreas Hindborg <a.hindborg@kernel.org>
发送时间: 2026年8月31日 20:55
收件人: 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>
抄送: linux-block@vger.kernel.org <linux-block@vger.kernel.org>; rust-for-linux@vger.kernel.org <rust-for-linux@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Sophon Z <aiqubits@hotmail.com>
主题: Re: [PATCH] rust: block: Fix GenDiskBuilder block size documentation
"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
^ permalink raw reply [flat|nested] 4+ messages in thread