STRUCT P9_CONN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct p9_conn(9) β€” the fd mux connection state info page, bestie edition πŸ¦‹

okay so this is a page from the Kernel API Manual, and it's literally all about struct p9_conn β€” the fd mux connection state information. yes that's the whole NAME section, and yes it's short, we love a concise queen πŸ’…


✨ SYNOPSIS ✨

like, here's the whole struct, copied exactly, no cap:

struct p9_conn {
    struct list_head mux_list;
    struct p9_client *client;
    int err;
    spinlock_t req_lock;
    struct list_head req_list;
    struct list_head unsent_req_list;
    struct p9_req_t *rreq;
    struct p9_req_t *wreq;
    char tmp_buf[P9_HDRSZ];
    struct p9_fcall rc;
    int wpos;
    int wsize;
    char *wbuf;
    struct list_head poll_pending_link;
    struct p9_poll_wait poll_wait[MAXPOLLWADDR];
    poll_table pt;
    struct work_struct rq;
    struct work_struct wq;
    unsigned long wsched;
 };

πŸŽ€ Members πŸŽ€

okay so let's go through every single member, one by one, because we do not skip πŸ’–

  • mux_list β€” list link for mux to manage multiple connections (the original literally has a (?) there, and honestly? same, bestie, we're keeping the question mark, iykyk πŸ™ˆ)
  • client β€” reference to client instance for this connection
  • err β€” error state
  • req_lock β€” lock protecting req_list and requests statuses
  • req_list β€” accounting for requests which have been sent
  • unsent_req_list β€” accounting for requests that haven't been sent (the "not yet" girlies, we see you 🌸)
  • rreq β€” read request
  • wreq β€” write request
  • tmp_buf β€” temporary buffer to read in header
  • rc β€” temporary fcall for reading current frame
  • wpos β€” write position for current frame
  • wsize β€” amount of data to write for current frame
  • wbuf β€” current write buffer
  • poll_pending_link β€” pending links to be polled per conn
  • poll_wait β€” array of wait_q's for various worker threads
  • pt β€” poll state
  • rq β€” current read work
  • wq β€” current write work
  • wsched β€” ???? and honestly the manpage itself said it with four question marks so we keep the four question marks πŸ’€ the docs are as confused as we are, fr fr

πŸ‘‘ SEE ALSO πŸ‘‘

the Kernel file ./net/9p/trans_fd.c and like, this whole friend group of functions β€” go say hi bestie 🫢:


ok and a lil sign-off note πŸŽ€ this one came from ./net/9p and it's dated October 2026 β€” so like, future girlie behavior, iconic. go read the source, drink some water, and slay your kernel debugging session, periodt πŸ’œβœ¨
πŸ“¦ where this page comes from