From: Danilo Krummrich Date: Mon, 20 Oct 2025 22:26:13 +0000 (+0200) Subject: rust: fs: add file::Offset type alias X-Git-Tag: ceph-for-6.19-rc5~184^2~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db7bd1affa852b61dbc0d2ae2809f0f5bf2e3d9d;p=ceph-client.git rust: fs: add file::Offset type alias Add a type alias for file offsets, i.e. bindings::loff_t. Trying to avoid using raw bindings types, this seems to be the better alternative compared to just using i64. Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Reviewed-by: Alice Ryhl Reviewed-by: Christian Brauner Link: https://patch.msgid.link/20251020222722.240473-2-dakr@kernel.org Signed-off-by: Danilo Krummrich --- diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs index cd6987850332..23ee689bd240 100644 --- a/rust/kernel/fs/file.rs +++ b/rust/kernel/fs/file.rs @@ -17,6 +17,11 @@ use crate::{ }; use core::ptr; +/// Primitive type representing the offset within a [`File`]. +/// +/// Type alias for `bindings::loff_t`. +pub type Offset = bindings::loff_t; + /// Flags associated with a [`File`]. pub mod flags { /// File is opened in append mode.