STRUCT UBIFS_INO_NODE(9)
π struct ubifs_ino_node(9) β the inode node, bestie
okay so real talk, we're deep in the kernel API manual rn (Kernel API Manual, to be exact) and today's main character is struct ubifs_ino_node β the inode node. yes THE inode node. it's giving "I hold everything you need to know about a file" energy and honestly? iconic. π
β¨ NAME β¨
struct ubifs_ino_node β inode node. that's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
struct ubifs_ino_node {
struct ubifs_ch ch;
__u8 key[UBIFS_MAX_KEY_LEN];
__le64 creat_sqnum;
__le64 size;
__le64 atime_sec;
__le64 ctime_sec;
__le64 mtime_sec;
__le32 atime_nsec;
__le32 ctime_nsec;
__le32 mtime_nsec;
__le32 nlink;
__le32 uid;
__le32 gid;
__le32 mode;
__le32 flags;
__le32 data_len;
__le32 xattr_cnt;
__le32 xattr_size;
__u8 padding1[4];
__le32 xattr_names;
__le16 compr_type;
__u8 padding2[26];
__u8 data[];
};
look at her. she's structured. she's aligned. she's literally the blueprint. π
π Members π
chβ the common header. every node's lil hello.keyβ the node key, fr fr your lookup bff.creat_sqnumβ sequence number at time of creation. the birth certificate timestamp. πsizeβ inode size in bytes (amount of uncompressed data). note: uncompressed, okay? don't come for me.atime_secβ access time seconds.ctime_secβ creation time seconds.mtime_secβ modification time seconds.atime_nsecβ access time nanoseconds. precision era β¨ctime_nsecβ creation time nanoseconds.mtime_nsecβ modification time nanoseconds.nlinkβ number of hard links. how many besties point at you.uidβ owner ID.gidβ group ID.modeβ access flags.flagsβ per-inode flags (UBIFS_COMPR_FL,UBIFS_SYNC_FL, etc). the personality traits.data_lenβ inode data length.xattr_cntβ count of extended attributes this inode has.xattr_sizeβ summarized size of all extended attributes in bytes.padding1β reserved for future, zeroes. it's a placeholder bestie, leave her alone π«Άxattr_namesβ sum of lengths of all extended attribute names belonging to this inode.compr_typeβ compression type used for this inode.padding2β reserved for future, zeroes. same deal. π«Άdataβ data attached to the inode. the actual content, the payload, the lore.
π¦ Description π¦
okay so important thing number one: even though the inode compression type is defined by compr_type, some nodes of this inode may be compressed with a different compressor. and why, you ask? it happens if the compression type is changed while the inode already has data nodes. messy, i know, but that's the situation π. but compr_type will be used for further writes to the inode. so like, going forward, that's the one. periodt.
β οΈ important thing number two, do NOT forget: amend 'zero_ino_node_unused' when you're changing the padding fields. that function is NOT about to be left on read. no cap. π
π SEE ALSO π
Kernel file ./fs/ubifs/ubifs-media.h and the whole friend group:
struct ubifs_ch(9)union ubifs_dev_desc(9)struct ubifs_dent_node(9)struct ubifs_data_node(9)struct ubifs_trun_node(9)struct ubifs_pad_node(9)struct ubifs_sb_node(9)struct ubifs_mst_node(9)struct ubifs_ref_node(9)struct ubifs_auth_node(9)struct ubifs_sig_node(9)struct ubifs_branch(9)struct ubifs_idx_node(9)struct ubifs_cs_node(9)struct ubifs_orph_node(9)
go read them. they ate. π₯
and that's the whole page, bestie β sobbing, screaming, throwing up (./fs/ubifs, dated October 2026), brought to you by the same folks who gave you struct ubifs_ino_node(9). mwah πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms