Skip to main content

dir_entries

Function dir_entries 

Source
pub fn dir_entries(
    dir_ino: u32,
    inode: &Inode,
    continuation: &[u8],
    has_filetype: bool,
) -> Result<Vec<DirEntry>>
Expand description

The entries of an inline-data directory, in the order the kernel’s readdir reports them: . (the directory itself), .. (read from bytes 0..4 of i_block), the entries in i_block[4..60], then those in continuation – the system.data xattr value, empty when the directory fits in i_block.

An inline directory holds no . or .. records: . is implicit, and .. is a bare inode number. Entries start at byte 4, so parsing from byte 0 reads the parent’s inode number as a record and fails with bad rec_len (#427).