STRUCT P9_SESSION_OPTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 type p9_session_flags ✨
  • nodev β€” set this to 1 to 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 type p9_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's V9FS_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