STRUCT FUSE_INODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct fuse_inode(9) β€” like, the FUSE inode page, bestie

okay so this is the kernel API manual page for struct fuse_inode(9), and no cap, it's literally the whole blueprint of a FUSE inode. every field, every lock, every little #ifdef β€” we're going through ALL of it. grab a snack πŸ“


✨ NAME ✨

struct fuse_inode β€” FUSE inode. that's the vibe. that's the whole name. iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the struct in all its glory, copied exactly so you can trust me fr fr:

struct fuse_inode {
    struct inode inode;
    u64 nodeid;
    u64 nlookup;
    struct fuse_forget_link *forget;
    u64 i_time;
    u32 inval_mask;
    umode_t orig_i_mode;
    struct timespec64 i_btime;
    u64 orig_ino;
    u64 attr_version;
    union {
      struct {
        struct list_head write_files;
        struct list_head queued_writes;
        int writectr;
        int iocachectr;
        wait_queue_head_t page_waitq;
        wait_queue_head_t direct_io_waitq;
      };
      struct {
        bool cached;
        loff_t size;
        loff_t pos;
        u64 version;
        struct timespec64 mtime;
        int epoch;
        u64 iversion;
        spinlock_t lock;
      } rdc;
    };
    unsigned long state;
    struct mutex mutex;
    spinlock_t lock;
  #ifdef CONFIG_FUSE_DAX;
    struct fuse_inode_dax *dax;
  #endif;
    struct fuse_submount_lookup *submount_lookup;
  #ifdef CONFIG_FUSE_PASSTHROUGH;
    struct fuse_backing *fb;
  #endif;
    u8 cached_i_blkbits;
 };

look at that union. look at those #ifdefs. it's giving ✨structured✨


πŸŽ€ Members πŸŽ€

time for the field-by-field tour, bestie. every single one, no skipping πŸ’–

  • inode β€” the inode data itself. the main character, honestly πŸ‘‘
  • nodeid β€” a unique ID that identifies the inode between userspace and kernel. it's the inode's little passport πŸ›‚
  • nlookup β€” number of lookups on this inode. yes we're counting. we love accountability πŸ’…
  • forget β€” the request used for sending the FORGET message
  • i_time β€” time in jiffies until the file attributes are valid ⏳
  • inval_mask β€” which attributes are invalid
  • orig_i_mode β€” the sticky bit in inode->i_mode may have been removed, so this preserves the original mode. preservation era 🫢
  • i_btime β€” cache birthtime. it's giving birthday πŸŽ‚
  • orig_ino β€” 64-bit inode number
  • attr_version β€” version of last attribute change
  • {unnamed_union} β€” anonymous. mysterious. lowkey main character energy πŸ™ˆ
  • {unnamed_struct} β€” anonymous again. the anonymity is the point ✨
  • write_files β€” files usable in writepage. protected by fi->lock πŸ”’
  • queued_writes β€” writepages pending on truncate or fsync
  • writectr β€” number of sent writes; a negative bias (FUSE_NOWRITE) means more writes are blocked ⚠️
  • iocachectr β€” number of files/maps using page cache
  • page_waitq β€” waitq for writepage completion
  • direct_io_waitq β€” waitq for direct-io completion
  • rdc β€” readdir cache (directory only). directory girlies only πŸ“
  • state β€” miscellaneous bits describing inode state
  • mutex β€” lock for serializing lookup and readdir for back compatibility
  • lock β€” lock to protect write-related fields
  • dax β€” Dax specific inode data
  • submount_lookup β€” submount specific lookup tracking
  • fb β€” reference to backing file in passthrough mode
  • cached_i_blkbits β€” the underlying inode->i_blkbits value will not be modified, so this preserves the blocksize specified by the server 🧚
ngl the lock situation here is a whole personality trait. mutex for lookup/readdir back compat, lock for write stuff, and write_files is protected by fi->lock. keep them straight, bestie πŸ’€

🌈 SEE ALSO 🌈

go read these next, iykwyk:


and that's the page!! 🫢 this whole thing lives over in ./fs/fuse, and it's dated October 2026, so like… future vibes ⭐ anyway bestie go forth and struct fuse_inode responsibly πŸ’œπŸ§š

πŸ“¦ where this page comes from