Re: [PATCH 1/3] rust: fs: add a new type for file::Offset

From: Danilo Krummrich

Date: Wed Nov 05 2025 - 06:39:59 EST


On Wed Nov 5, 2025 at 12:19 PM CET, Danilo Krummrich wrote:
> On Wed Nov 5, 2025 at 11:59 AM CET, Christian Brauner wrote:
>> On Wed, Nov 05, 2025 at 01:22:48AM +0100, Danilo Krummrich wrote:
>>> Replace the existing file::Offset type alias with a new type.
>>>
>>> Compared to a type alias, a new type allows for more fine grained
>>> control over the operations that (semantically) make sense for a
>>> specific type.
>>>
>>> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
>>> Cc: Christian Brauner <brauner@xxxxxxxxxx>
>>> Cc: Jan Kara <jack@xxxxxxx>
>>> Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>>> Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>>> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
>>> Link: https://github.com/Rust-for-Linux/linux/issues/1198
>>> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
>>> ---
>>
>> What's the base for this?
>> If it's stuff that belongs to fs/ I'd prefer if it always uses a stable
>> -rc* version as base where possible.
>
> Please see [1]; the base is [2] from the driver-core tree.

For more context, when I picked up the debugfs patch series from [1] I picked up
the patch that only introduced the file::Offset type alias for loff_t as a
dependency and sent this series as a follow-up.

Hence, I can either take this one through the driver-core tree as well, or, if
you prefer we can also wait for a cycle, so you can pick it up through the FS
tree.

> [1] https://lore.kernel.org/lkml/DE0C1KA14PDQ.Q2CJDDTQPWOK@xxxxxxxxxx/
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git/tree/?id=1bf5b90cd2f984e5d6ff6fd30d5d85f9f579b6f0