STRUCT FUSE_CONN(9)
π struct fuse_conn(9) β A Fuse connection
okay bestie, so this is a page from the Kernel API Manual, and it's literally all about struct fuse_conn β the little (huge) struct that is a FUSE connection. no cap, this thing is the main character of the whole FUSE mount situation, so let's get into it π
β¨ SYNOPSIS β¨
like, here's the whole vibe, every single field, verbatim, don't touch anything:
struct fuse_conn {
spinlock_t lock;
refcount_t count;
atomic_t epoch;
struct work_struct epoch_work;
struct rcu_head rcu;
kuid_t user_id;
kgid_t group_id;
struct pid_namespace *pid_ns;
struct user_namespace *user_ns;
unsigned max_read;
unsigned max_write;
unsigned int max_pages;
unsigned int max_pages_limit;
struct fuse_chan *chan;
atomic64_t khctr;
struct rb_root polled_files;
unsigned congestion_threshold;
unsigned conn_error:1;
unsigned conn_init:1;
unsigned async_read:1;
unsigned abort_err:1;
unsigned atomic_o_trunc:1;
unsigned export_support:1;
unsigned writeback_cache:1;
unsigned parallel_dirops:1;
unsigned handle_killpriv:1;
unsigned cache_symlinks:1;
unsigned int legacy_opts_show:1;
unsigned handle_killpriv_v2:1;
unsigned no_open:1;
unsigned no_opendir:1;
unsigned no_fsync:1;
unsigned no_fsyncdir:1;
unsigned no_flush:1;
unsigned no_setxattr:1;
unsigned setxattr_ext:1;
unsigned no_getxattr:1;
unsigned no_listxattr:1;
unsigned no_removexattr:1;
unsigned no_lock:1;
unsigned no_access:1;
unsigned no_create:1;
unsigned no_bmap:1;
unsigned no_poll:1;
unsigned big_writes:1;
unsigned dont_mask:1;
unsigned no_flock:1;
unsigned no_fallocate:1;
unsigned no_rename2:1;
unsigned auto_inval_data:1;
unsigned explicit_inval_data:1;
unsigned do_readdirplus:1;
unsigned readdirplus_auto:1;
unsigned async_dio:1;
unsigned no_lseek:1;
unsigned posix_acl:1;
unsigned default_permissions:1;
unsigned allow_other:1;
unsigned no_copy_file_range:1;
unsigned no_copy_file_range_64:1;
unsigned int destroy:1;
unsigned int delete_stale:1;
unsigned int no_control:1;
unsigned int no_force_umount:1;
unsigned int auto_submounts:1;
unsigned int sync_fs:1;
unsigned int init_security:1;
unsigned int create_supp_group:1;
unsigned int inode_dax:1;
unsigned int no_tmpfile:1;
unsigned int direct_io_allow_mmap:1;
unsigned int no_statx:1;
unsigned int passthrough:1;
unsigned int use_pages_for_kvec_io:1;
unsigned int no_link:1;
unsigned int sync_init:1;
int max_stack_depth;
unsigned minor;
struct list_head entry;
dev_t dev;
u32 scramble_key[4];
atomic64_t attr_version;
atomic64_t evict_ctr;
u32 name_max;
void (*release)(struct fuse_conn *);
struct rw_semaphore killsb;
#ifdef CONFIG_FUSE_DAX;
enum fuse_dax_mode dax_mode;
struct fuse_conn_dax *dax;
#endif;
struct list_head mounts;
struct fuse_sync_bucket *curr_bucket;
#ifdef CONFIG_FUSE_PASSTHROUGH;
struct idr backing_files_map;
#endif;
};
π¦ Members
π the locking & lifetime girlies
lockβ the lock that protects:polled_files,backing_files_map,curr_bucket. she's guarding three things at once, multitasking icon πcountβ the refcount, bestieepochβ the current epoch, for up-to-date dentriesepoch_workβ used to invalidate dentries from old epochsrcuβ used to delay freeingfuse_conn, making it safe
π«Ά the "who even are you" identity block
user_idβ the user id for this mountgroup_idβ the group id for this mountpid_nsβ the pid namespace for this mountuser_nsβ the user namespace for this mount
π sizes & limits
max_readβ maximum read sizemax_writeβ maximum write sizemax_pagesβ maximum number of pages that can be used in a single requestmax_pages_limitβ constrain->max_pagesto this value during feature negotiation
π transport & handles
chanβ transport layer objectkhctrβ the next unique kernel file handlepolled_filesβ rbtree offuse_fileswaiting for poll events indexed byphcongestion_thresholdβ number of background requests at which congestion starts
π©Ή connection-status bits
conn_errorβ connection failed (version mismatch). Cannot race with setting other bitfields since it is only set once in INIT reply, before any other request, and never clearedconn_initβ connection successful. Only set in INITasync_readβ do readahead asynchronously? Only set in INITabort_errβ return an unique read error after abort. Only set in INIT
π the behaviour flags, in original order (yes, all of them)
atomic_o_truncβ do not send separateSETATTRrequest beforeopen(O_TRUNC)export_supportβ filesystem supports NFS exporting. Only set in INITwriteback_cacheβ write-back cache policy (default is write-through)parallel_diropsβ allow parallel lookups and readdir (default is serialized)handle_killprivβ handle fs handles killing suid/sgid/cap on write/chown/trunccache_symlinksβ cacheREADLINKresponses in page cachelegacy_opts_showβ show legacy mount optionshandle_killpriv_v2β fs kills suid/sgid/cap on write/chown/trunc. suid is killed on write/trunc only if caller did not haveCAP_FSETID. sgid is killed on write/truncate only if caller did not haveCAP_FSETIDas well as file has group execute permission.no_openβ is open/release not implemented by fs?no_opendirβ is opendir/releasedir not implemented by fs?no_fsyncβ is fsync not implemented by fs?no_fsyncdirβ is fsyncdir not implemented by fs?no_flushβ is flush not implemented by fs?no_setxattrβ is setxattr not implemented by fs?setxattr_extβ does file server support extended setxattrno_getxattrβ is getxattr not implemented by fs?no_listxattrβ is listxattr not implemented by fs?no_removexattrβ is removexattr not implemented by fs?no_lockβ are posix file locking primitives not implemented by fs?no_accessβ is access not implemented by fs?no_createβ is create not implemented by fs?no_bmapβ is bmap not implemented by fs?no_pollβ is poll not implemented by fs?big_writesβ do multi-page cached writesdont_maskβ don't apply umask to creation modesno_flockβ are BSD file locking primitives not implemented by fs?no_fallocateβ is fallocate not implemented by fs?no_rename2β is rename with flags implemented by fs?auto_inval_dataβ use enhanced/automatic page cache invalidation.explicit_inval_dataβ filesystem is fully responsible for page cache invalidation.do_readdirplusβ does the filesystem support readdirplus?readdirplus_autoβ does the filesystem want adaptive readdirplus?async_dioβ does the filesystem support asynchronous direct-IO submission?no_lseekβ is lseek not implemented by fs?posix_aclβ does the filesystem support posix acls?default_permissionsβ check permissions based on the file mode or not?allow_otherβ allow other than the mounter user to access the filesystem ?no_copy_file_rangeβ does the filesystem supportcopy_file_range?no_copy_file_range_64β does the filesystem supportcopy_file_range_64?destroyβ sendDESTROYrequestdelete_staleβ delete dentries that have gone staleno_controlβ do not create entry in fusectl fsno_force_umountβ do not allowMNT_FORCEumountauto_submountsβ auto-mount submounts announced by the serversync_fsβ propagate syncfs to serverinit_securityβ initialize security xattrs when creating a new inodecreate_supp_groupβ add supplementary group info when creating a new inodeinode_daxβ does the filesystem support per inode DAX?no_tmpfileβ is tmpfile not implemented by fs?direct_io_allow_mmapβ relax restrictions to allow shared mmap inFOPEN_DIRECT_IOmodeno_statxβ is statx not implemented by fs?passthroughβ passthrough support for read/write IOuse_pages_for_kvec_ioβ use pages instead of pointer for kernel I/Ono_linkβ is link not implemented by fs?sync_initβ is synchronousFUSE_INITallowed?
πΈ more numbers & bookkeeping
max_stack_depthβ maximum stack depth for passthrough backing filesminorβ negotiated minor versionentryβ entry on thefuse_conn_listdevβ device ID from the root super blockscramble_keyβ key for lock owner ID scramblingattr_versionβ version counter for attribute changesevict_ctrβ version counter for evict inodename_maxβ maximum file name lengthreleaseβ called on final putkillsbβ read/write semaphore to hold when accessing the sb of anyfuse_mountbelonging to this connection
π§ the CONFIG-gated ones
dax_modeβ Dax modedaxβ Dax specific conn data, non-NULLif DAX is enabledmountsβ list of filesystems using this connectioncurr_bucketβ new writepages go into this bucketbacking_files_mapβ IDR for backing files ids
π Description
so this structure is created when the root filesystem is mounted, and it's destroyed when the client device is closed and the last fuse_mount is destroyed. literally birth and death of a connection, it's giving full life cycle π¦β¨
π SEE ALSO
kernel file ./fs/fuse/fuse_i.h β plus these besties: struct fuse_submount_lookup(9), struct fuse_inode(9), struct fuse_file(9), fuse_fill_super_common(9), fuse_mount_remove(9), fuse_ctl_add_conn(9), fuse_ctl_remove_conn(9)
π real talk though: those#ifdef CONFIG_FUSE_DAXand#ifdef CONFIG_FUSE_PASSTHROUGHblocks mean some of these fields only exist in certain kernel configs. not every build gets the whole squad, iykyk π
okay that's the whole page, go off bestie π this one came straight out of ./fs/fuse and it's dated October 2026 β save the date, screenshot it, put it on the fridge πβ¨π«Ά
π¦ 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