pub struct InodeRef {
pub ino: u32,
pub generation: Option<u32>,
}Expand description
An inode named by number, for the inode-addressed entry points
(lookup_at, stat_ino, apply_*_at, apply_*_ino).
A handle-based host holds one of these per item instead of a path: a path is the wrong key for a driver, because a hard link gives one inode several, and renaming a directory changes every one beneath it.
generation is the i_generation the caller read alongside the number
(every attribute read returns it). With it, a handle to an inode that
was freed and then reused for a different file is refused as
Error::Stale instead of reaching the new file. Without it (None,
or a bare u32 converted with into()) only a freed or never-used
inode is refused, which is what a caller that has not read the
generation yet can ask for.
Fields§
§ino: u32Inode number (1-based).
generation: Option<u32>Expected i_generation, or None to accept any.