STRUCT P9_CONN(9)
π¦ 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 connectionerrβ error statereq_lockβ lock protectingreq_listand requests statusesreq_listβ accounting for requests which have been sentunsent_req_listβ accounting for requests that haven't been sent (the "not yet" girlies, we see you πΈ)rreqβ read requestwreqβ write requesttmp_bufβ temporary buffer to read in headerrcβ temporary fcall for reading current framewposβ write position for current framewsizeβ amount of data to write for current framewbufβ current write bufferpoll_pending_linkβ pending links to be polled per connpoll_waitβ array ofwait_q's for various worker threadsptβ poll staterqβ current read workwqβ current write workwschedβ????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 π«Ά:
struct p9_trans_fd(9)p9_conn_cancel(9)p9_fd_read(9)p9_read_work(9)p9_fd_write(9)p9_write_work(9)p9_pollwait(9)p9_conn_create(9)p9_poll_mux(9)p9_fd_request(9)p9_conn_destroy(9)p9_fd_close(9)p9_poll_workfn(9)
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
- 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