STRUCT FUSE_INODE(9)
π 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 messagei_timeβ time in jiffies until the file attributes are valid β³inval_maskβ which attributes are invalidorig_i_modeβ the sticky bit ininode->i_modemay have been removed, so this preserves the original mode. preservation era π«Άi_btimeβ cache birthtime. it's giving birthday πorig_inoβ 64-bit inode numberattr_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 byfi->lockπqueued_writesβ writepages pending on truncate or fsyncwritectrβ number of sent writes; a negative bias (FUSE_NOWRITE) means more writes are blocked β οΈiocachectrβ number of files/maps using page cachepage_waitqβ waitq for writepage completiondirect_io_waitqβ waitq for direct-io completionrdcβ readdir cache (directory only). directory girlies only πstateβ miscellaneous bits describing inode statemutexβ lock for serializing lookup and readdir for back compatibilitylockβ lock to protect write-related fieldsdaxβ Dax specific inode datasubmount_lookupβ submount specific lookup trackingfbβ reference to backing file in passthrough modecached_i_blkbitsβ the underlyinginode->i_blkbitsvalue will not be modified, so this preserves the blocksize specified by the server π§
ngl the lock situation here is a whole personality trait.mutexfor lookup/readdir back compat,lockfor write stuff, andwrite_filesis protected byfi->lock. keep them straight, bestie π
π SEE ALSO π
go read these next, iykwyk:
- Kernel file
./fs/fuse/fuse_i.h struct fuse_submount_lookup(9)struct fuse_file(9)struct fuse_conn(9)fuse_fill_super_common(9)fuse_mount_remove(9)fuse_ctl_add_conn(9)fuse_ctl_remove_conn(9)
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
- 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