nfs4_test_session_trunk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfs4_test_session_trunk(9) ✨

Okay bestie, so this is a page straight out of the Kernel API Manual β€” nfs4_test_session_trunk(9) β€” and yes, the name is a whole mouthful, but we're gonna get through it together 🫢


🌸 NAME 🌸

nfs4_test_session_trunk β€”

Not me leaving the description blank 😭 that's literally it, that's the whole NAME section. Iconic, mysterious, gives nothing away. Respect.

✨ SYNOPSIS ✨

void nfs4_test_session_trunk (struct rpc_clnt *clnt , struct rpc_xprt
*xprt , void *data );

Three args, returns void, no notes. She's a simple girlie doing a simple job πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • clnt β€” a struct rpc_clnt, and specifically the one that's gonna get a shiny new transport. It's giving "here's your client, go make her faster" πŸ’–
  • xprt β€” the rpc_xprt you're testing. This is the transport candidate β€” the vibe check happens here, no cap.
  • data β€” the call data for _nfs4_proc_exchange_id. Lowkey the payload that gets handed along to the exchange-id machinery.

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜• β€” this function is an add_xprt_test test function, and it gets called from rpc_clnt_setup_test_and_add_xprt. It's a callback, bestie, it doesn't just show up on its own.

The rpc_xprt_switch is referenced by rpc_clnt_setup_test_and_add_xprt, and it gets dereferenced over in nfs4_exchange_id_release. So the refcount is a two-party situation β€” one side grabs it, the other side lets it go. Do not break that chain, fr fr πŸ™ˆ

And then the reward: upon success, the new transport gets added to the rpc_clnt πŸ”₯ That's the whole moment. The main character energy. The transport is officially in the group chat ✨

Heads up though β€” that success clause is load-bearing. The add only happens on success, so don't go assuming the transport is in there before you know it went through πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./fs/nfs/nfs4proc.c and the whole friend group:


And that's the page, bestie πŸ’œ mwah πŸ’‹ β€” this one lives in ./fs/nfs and it's dated October 2026, so jot that down in your notes app πŸ“πŸŽ€

πŸ“¦ where this page comes from