#[repr(C)]pub struct InodeKey {
pub ino: u64,
pub dev: u32,
pub gen: u32,
}Expand description
Key used to identify an inode in BPF maps.
§ABI and kernel assumptions
This struct is #[repr(C)] and used across the eBPF/userspace boundary,
so its layout must remain in sync with the corresponding kernel/BPF-side
definition.
The dev field stores the kernel’s encoded dev_t value (e.g. from
super_block.s_dev) as a u32. On modern Linux kernels, this uses the
new_encode_dev() format:
(minor & 0xff) | ((major & 0xfff) << 8) | ((minor & 0xfffff00) << 12)
This matches sb->s_dev seen by eBPF.
Fields§
§ino: u64§dev: u32§gen: u32Trait Implementations§
impl Copy for InodeKey
impl Eq for InodeKey
impl StructuralPartialEq for InodeKey
Auto Trait Implementations§
impl Freeze for InodeKey
impl RefUnwindSafe for InodeKey
impl Send for InodeKey
impl Sync for InodeKey
impl Unpin for InodeKey
impl UnwindSafe for InodeKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more