STRUCT P9_SESSION_OPTS(9)
π¦ struct p9_session_opts(9) π¦
okay bestie, so we're in the Kernel API Manual today and the vibe is very kernel-adjacent π
. This is the page for struct p9_session_opts β the little glow-up container that holds all your parsed options before they get handed off to v9fs_session_info. Think of it as the fitting room, and v9fs_session_info is the outfit it eventually walks out in. iykyk β¨
β¨ NAME β¨
struct p9_session_opts β literally just holds the parsed options for v9fs_session_info. that's the whole job. no cap π
πΈ SYNOPSIS πΈ
struct p9_session_opts {
unsigned int flags;
unsigned char nodev;
unsigned short debug;
unsigned int afid;
unsigned int cache;
unsigned int ndentry_timeout_ms;
#ifdef CONFIG_9P_FSCACHE;
char *cachetag;
#endif;
char *uname;
char *aname;
kuid_t dfltuid;
kgid_t dfltgid;
kuid_t uid;
long session_lock_timeout;
};
look at her. all those fields. main character energy fr fr π
π Members π
okay so let's go through the whole friend group one by one:
flagsβ session options, and they're of typep9_session_flagsβ¨nodevβ set this to1to disable device mapping. like, don't do the device thing. bye πdebugβ the debug level. how chatty do you want this to be π£οΈafidβ the authentication handle π«Άcacheβ cache mode, of typep9_cache_bitsπ§ndentry_timeout_msβ negative dentry lookup cache retention time, in ms. yes it's a long name. she's worth it β±οΈcachetagβ the tag of the cache associated with this session π·οΈunameβ string user name, for which user to mount the hierarchy as πanameβ mount specifier for the remote hierarchy πdfltuidβ default numeric userid to mount the hierarchy as πdfltgidβ default numeric groupid to mount the hierarchy as πuidβ ooh okay so if it'sV9FS_ACCESS_SINGLE, this is the numeric uid that mounted the hierarchy. only that case, bestie βsession_lock_timeoutβ retry interval for blocking locks. patience is a virtue etc etc β³
π Description π
so this structure holds the options that get parsed, and they will be transferred to the v9fs_session_info structure when mounted π¦. which means it largely duplicates struct v9fs_session_info. yeah. it's giving "twins but one of them is temporary." iconic π
π₯ SEE ALSO π₯
kernel file ./include/net/9p/client.h, plus the whole squad:
enum p9_trans_status(9)enum p9_req_status_t(9)struct p9_req_t(9)struct p9_client(9)struct p9_fd_opts(9)struct p9_rdma_opts(9)struct p9_dirent(9)
go read those when you're done here, they're all lowkey obsessed with each other π
and that's the page!! πΈ mwah π. source lives at ./include/net/9p, dated October 2026, and yes she signs off as struct p9_session_opts(9) because she's that girl πβ¨
π¦ 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