* Re: [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1
[not found] ` <179068244058.1205226.1765319338142659278.b4-ty@b4>
@ 2026-09-30 15:06 ` Thorsten Leemhuis
2026-09-30 15:25 ` Miguel Ojeda
2026-09-30 15:31 ` Gary Guo
0 siblings, 2 replies; 4+ messages in thread
From: Thorsten Leemhuis @ 2026-09-30 15:06 UTC (permalink / raw)
To: Jens Axboe, Andreas Hindborg
Cc: 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,
Alvin Sun, stable, Priya Bala Govindasamy, Dylan Zueck, Yuan Tan,
Sophon Z, Qingxiao Xu, Malte Wechter, Mark Brown,
Linux kernel regressions list, Linux Next Mailing List
On 9/29/26 13:47, Jens Axboe wrote:
> On Tue, 29 Sep 2026 11:33:58 +0200, Andreas Hindborg wrote:
>> I have a number of Rust block layer patches I would ask you to pick for
>> v7.4. I have collected them into a patch series as well as a pull request
>> so you can use whatever is easier.
>>
>> The changes cover
>>
>> - Style and formatting changes.
>> - Documentation fixes.
>> - Fixes for missing trait bounds that can cause API unsoundness.
>> - A change to set the owner of the file operations vtable in `GenDisk`.
>> - Two bug fixes for the rnull driver.
>>
>> [...]
>
> Applied, thanks!
> [...]
This series showed up in next today and broke the build for me on
various Fedora releases for aarch64 and x86_64; reverting this series
fixed that from a quick build test limited to drivers/block/rnull/
The full error msg is quote long, find the top of it below. Full log:
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/11055137-next-next-all/builder-live.log.gz
Ciao, Thorsten
"""
> error[E0277]: `UnsafeCell<MaybeUninit<blk_mq_tag_set>>` cannot be shared between threads safely
> --> drivers/block/rnull/configfs.rs:57:18
> |
> 57 | type Child = DeviceConfig;
> | ^^^^^^^^^^^^ `UnsafeCell<MaybeUninit<blk_mq_tag_set>>` cannot be shared between threads safely
> |
> = help: within `TagSet<NullBlkDevice>`, the trait `Sync` is not implemented for `UnsafeCell<MaybeUninit<blk_mq_tag_set>>`
> note: required because it appears within the type `Opaque<blk_mq_tag_set>`
> --> rust/kernel/types.rs:332:12
> |
> 332 | pub struct Opaque<T> {
> | ^^^^^^
> note: required because it appears within the type `TagSet<NullBlkDevice>`
> --> rust/kernel/block/mq/tag_set.rs:32:12
> |
> 32 | pub struct TagSet<T: Operations> {
> | ^^^^^^
> = note: required for `Arc<TagSet<NullBlkDevice>>` to implement `Send`
> = note: 1 redundant requirement hidden
> = note: required for `GenDisk<NullBlkDevice>` to implement `Send`
> note: required because it appears within the type `Option<GenDisk<NullBlkDevice>>`
> --> /usr/lib/rustlib/src/rust/library/core/src/option.rs:598:10
> |
> 598 | pub enum Option<T> {
> | ^^^^^^
> note: required because it appears within the type `DeviceConfigInner`
> --> drivers/block/rnull/configfs.rs:130:8
> |
> 130 | struct DeviceConfigInner {
> | ^^^^^^^^^^^^^^^^^
> = note: required for `Lock<DeviceConfigInner, MutexBackend>` to implement `Send`
> note: required because it appears within the type `DeviceConfig`
> --> drivers/block/rnull/configfs.rs:124:19
> |
> 124 | pub(crate) struct DeviceConfig {
> | ^^^^^^^^^^^^
> note: required by a bound in `kernel::configfs::GroupOperations::Child`
> --> rust/kernel/configfs.rs:518:27
> |
> 518 | type Child: 'static + Send;
> | ^^^^ required by this bound in `GroupOperations::Child`
>
> error[E0277]: `*const blk_mq_ops` cannot be sent between threads safely
> --> drivers/block/rnull/configfs.rs:57:18
> |
> 57 | type Child = DeviceConfig;
> | ^^^^^^^^^^^^ `*const blk_mq_ops` cannot be sent between threads safely
> |
> = help: within `TagSet<NullBlkDevice>`, the trait `Send` is not implemented for `*const blk_mq_ops`
> note: required because it appears within the type `blk_mq_tag_set`
> --> /builddir/build/BUILD/kernel-7.3.0-build/kernel-next-20260930/linux-7.3.0-0.0.next.20260930.545.vanilla.fc46.aarch64/rust/bindings/bindings_generated.rs:105198:12
> |
> 105198 | pub struct blk_mq_tag_set {
> | ^^^^^^^^^^^^^^
> note: required because it appears within the type `MaybeDangling<blk_mq_tag_set>`
> --> /usr/lib/rustlib/src/rust/library/core/src/mem/maybe_dangling.rs:73:12
> |
> 73 | pub struct MaybeDangling<P: ?Sized>(P);
> [...]"""
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1
2026-09-30 15:06 ` [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1 Thorsten Leemhuis
@ 2026-09-30 15:25 ` Miguel Ojeda
2026-09-30 15:31 ` Gary Guo
1 sibling, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-09-30 15:25 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Jens Axboe, Andreas Hindborg, 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, Alvin Sun, stable, Priya Bala Govindasamy,
Dylan Zueck, Yuan Tan, Sophon Z, Qingxiao Xu, Malte Wechter,
Mark Brown, Linux kernel regressions list,
Linux Next Mailing List
On Wed, Sep 30, 2026 at 5:07 PM Thorsten Leemhuis <linux@leemhuis.info> wrote:
>
> This series showed up in next today and broke the build for me on
> various Fedora releases for aarch64 and x86_64; reverting this series
> fixed that from a quick build test limited to drivers/block/rnull/
>
> The full error msg is quote long, find the top of it below. Full log:
> https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/11055137-next-next-all/builder-live.log.gz
Confirmed, I see it e.g. in my arm32 build.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1
2026-09-30 15:06 ` [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1 Thorsten Leemhuis
2026-09-30 15:25 ` Miguel Ojeda
@ 2026-09-30 15:31 ` Gary Guo
2026-09-30 19:49 ` Andreas Hindborg
1 sibling, 1 reply; 4+ messages in thread
From: Gary Guo @ 2026-09-30 15:31 UTC (permalink / raw)
To: Thorsten Leemhuis, Jens Axboe, Andreas Hindborg
Cc: 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,
Alvin Sun, stable, Priya Bala Govindasamy, Dylan Zueck, Yuan Tan,
Sophon Z, Qingxiao Xu, Malte Wechter, Mark Brown,
Linux kernel regressions list, Linux Next Mailing List
On Wed Sep 30, 2026 at 4:06 PM BST, Thorsten Leemhuis wrote:
> On 9/29/26 13:47, Jens Axboe wrote:
>> On Tue, 29 Sep 2026 11:33:58 +0200, Andreas Hindborg wrote:
>>> I have a number of Rust block layer patches I would ask you to pick for
>>> v7.4. I have collected them into a patch series as well as a pull request
>>> so you can use whatever is easier.
>>>
>>> The changes cover
>>>
>>> - Style and formatting changes.
>>> - Documentation fixes.
>>> - Fixes for missing trait bounds that can cause API unsoundness.
>>> - A change to set the owner of the file operations vtable in `GenDisk`.
>>> - Two bug fixes for the rnull driver.
>>>
>>> [...]
>>
>> Applied, thanks!
>> [...]
>
> This series showed up in next today and broke the build for me on
> various Fedora releases for aarch64 and x86_64; reverting this series
> fixed that from a quick build test limited to drivers/block/rnull/
>
> The full error msg is quote long, find the top of it below. Full log:
> https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/11055137-next-next-all/builder-live.log.gz
The `Child: Send` bound is introduced in configfs:
https://lore.kernel.org/all/tencent_05937A22D2DA2BAE808EF19E491AA109BC09@qq.com/.
So this is more or less a semantic conflict.
However, the fundamental issue is that TagSet never implements Send/Sync, which
means that "rust: block: fix `Send` bound for `GenDisk`" will unconditionally
strip away the Send implementation, which is problematic.
Something like this should fix the issue:
unsafe impl<T: Operations<QueueData: Send>> Send for TagSet<T> {}
unsafe impl<T: Operations<QueueData: Send>> Sync for TagSet<T> {}
That said, I am not sure why the GenDisk need to carry `Arc<TagSet<T>>: Send`
bound in the first place. Removing it should also fix the issue.
Also, the `QueueData: Send` bound should be part of the `Operations` trait and
not carried around everywhere.
Best,
Gary
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1
2026-09-30 15:31 ` Gary Guo
@ 2026-09-30 19:49 ` Andreas Hindborg
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Hindborg @ 2026-09-30 19:49 UTC (permalink / raw)
To: Gary Guo, Thorsten Leemhuis, Jens Axboe
Cc: 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,
Alvin Sun, stable, Priya Bala Govindasamy, Dylan Zueck, Yuan Tan,
Sophon Z, Qingxiao Xu, Malte Wechter, Mark Brown,
Linux kernel regressions list, Linux Next Mailing List
"Gary Guo" <gary@garyguo.net> writes:
> On Wed Sep 30, 2026 at 4:06 PM BST, Thorsten Leemhuis wrote:
>> On 9/29/26 13:47, Jens Axboe wrote:
>>> On Tue, 29 Sep 2026 11:33:58 +0200, Andreas Hindborg wrote:
>>>> I have a number of Rust block layer patches I would ask you to pick for
>>>> v7.4. I have collected them into a patch series as well as a pull request
>>>> so you can use whatever is easier.
>>>>
>>>> The changes cover
>>>>
>>>> - Style and formatting changes.
>>>> - Documentation fixes.
>>>> - Fixes for missing trait bounds that can cause API unsoundness.
>>>> - A change to set the owner of the file operations vtable in `GenDisk`.
>>>> - Two bug fixes for the rnull driver.
>>>>
>>>> [...]
>>>
>>> Applied, thanks!
>>> [...]
>>
>> This series showed up in next today and broke the build for me on
>> various Fedora releases for aarch64 and x86_64; reverting this series
>> fixed that from a quick build test limited to drivers/block/rnull/
>>
>> The full error msg is quote long, find the top of it below. Full log:
>> https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/11055137-next-next-all/builder-live.log.gz
>
> The `Child: Send` bound is introduced in configfs:
> https://lore.kernel.org/all/tencent_05937A22D2DA2BAE808EF19E491AA109BC09@qq.com/.
> So this is more or less a semantic conflict.
I did not consider the interactions of the two trees together. Good
thing we have linux-next.
> However, the fundamental issue is that TagSet never implements Send/Sync, which
> means that "rust: block: fix `Send` bound for `GenDisk`" will unconditionally
> strip away the Send implementation, which is problematic.
>
> Something like this should fix the issue:
>
> unsafe impl<T: Operations<QueueData: Send>> Send for TagSet<T> {}
> unsafe impl<T: Operations<QueueData: Send>> Sync for TagSet<T> {}
>
> That said, I am not sure why the GenDisk need to carry `Arc<TagSet<T>>: Send`
> bound in the first place. Removing it should also fix the issue.
`GenDisk<T>` has a field of type `Arc<TagSet<T>>`, so for `GenDisk` to be
send, so must `Arc<TagSet<T>>`. That `Arc` may be dropped with the
`GenDisk` if it is the last reference.
> Also, the `QueueData: Send` bound should be part of the `Operations` trait and
> not carried around everywhere.
`QueueData` is not involved here. An unconditional implementation is
fine. I submitted a patch here [1], hopefully Jens can pick it soon so
next can be unbroken tomorrow.
Best regards,
Andreas Hindborg
[1] https://lore.kernel.org/r/20260930-tag-set-send-sync-v1-1-51acdb36f4bb@kernel.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-30 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260929-rust-block-for-v7-4-rc1-b4-v1-0-642a4c1aebd7@kernel.org>
[not found] ` <179068244058.1205226.1765319338142659278.b4-ty@b4>
2026-09-30 15:06 ` [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1 Thorsten Leemhuis
2026-09-30 15:25 ` Miguel Ojeda
2026-09-30 15:31 ` Gary Guo
2026-09-30 19:49 ` Andreas Hindborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox