STRUCT UBIFS_INO_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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