#[repr(C, align(8))]pub struct InodeRaw {Show 18 fields
pub i_ino: u64,
pub i_atime: u64,
pub i_ctime: u64,
pub i_mtime: u64,
pub i_atime_nsec: u32,
pub i_ctime_nsec: u32,
pub i_mtime_nsec: u32,
pub i_meta_config: u32,
pub i_uid: u32,
pub i_gid: u32,
pub i_mode: u32,
pub i_flags: u32,
pub i_nlink: u64,
pub i_size: u64,
pub i_blocks: u64,
pub i_last_seq: u64,
pub i_last_cno: u64,
pub i_bmap: BMapRawType,
}Fields§
§i_ino: u64§i_atime: u64§i_ctime: u64§i_mtime: u64§i_atime_nsec: u32§i_ctime_nsec: u32§i_mtime_nsec: u32§i_meta_config: u32§i_uid: u32§i_gid: u32§i_mode: u32§i_flags: u32§i_nlink: u64§i_size: u64§i_blocks: u64§i_last_seq: u64§i_last_cno: u64§i_bmap: BMapRawTypeImplementations§
Source§impl InodeRaw
impl InodeRaw
Sourcepub const FLAG_INLINE: u32 = 0x1
pub const FLAG_INLINE: u32 = 0x1
i_flags bit marking a fully-inlined small file: its bytes live in this
inode’s tail region (i_blocks..i_bmap) instead of in data blocks, and
the file has NO separate FILE/<uuid> object. i_size is the length.
Sourcepub const FLAG_KEEP_OPEN: u32 = 0x2
pub const FLAG_KEEP_OPEN: u32 = 0x2
i_flags bit marking a file that opts in to cross-mount
open-but-unlinked semantics: while any mount holds it open (tracked by
an S3 open-lease), an unlink from another mount silly-renames it instead
of tombstoning, so its storage survives until the last close. Set via the
user.hyperfs.keep_open xattr; off by default (no extra coordination
cost). Independent of FLAG_INLINE.
pub fn as_mut_u8_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_u8_slice(&self) -> &[u8] ⓘ
pub fn from_u8_slice(buf: &[u8]) -> Self
Sourcepub fn is_keep_open(&self) -> bool
pub fn is_keep_open(&self) -> bool
True if this inode opts in to cross-mount open-but-unlinked (see
[FLAG_KEEP_OPEN]).
Sourcepub fn set_keep_open(&mut self, on: bool)
pub fn set_keep_open(&mut self, on: bool)
Set/clear [FLAG_KEEP_OPEN].
Sourcepub const fn inline_offset() -> usize
pub const fn inline_offset() -> usize
Byte offset of the inline-data region within the raw inode (the start of
the contiguous tail i_blocks, i_last_seq, i_last_cno, i_bmap).
Sourcepub const fn inline_cap() -> usize
pub const fn inline_cap() -> usize
Maximum inline payload (the size of that tail region).
Sourcepub fn inline_data(&self) -> &[u8] ⓘ
pub fn inline_data(&self) -> &[u8] ⓘ
The inlined bytes (i_size of them); empty if not inlined.
Sourcepub fn set_inline(&mut self, data: &[u8])
pub fn set_inline(&mut self, data: &[u8])
Mark this inode inline and store data (must fit inline_cap()):
sets the flag, i_size = data.len(), zeroes the tail region, copies in.
Caller is responsible for there being no FILE/<uuid> object/segments.
Sourcepub fn clear_inline(&mut self)
pub fn clear_inline(&mut self)
Clear the inline flag (e.g. when spilling to a real segmented file). Does not touch the tail region; the caller rebuilds the bmap.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InodeRaw
impl RefUnwindSafe for InodeRaw
impl Send for InodeRaw
impl Sync for InodeRaw
impl Unpin for InodeRaw
impl UnsafeUnpin for InodeRaw
impl UnwindSafe for InodeRaw
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more