nfs4_test_session_trunk(9)
π 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β astruct 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β therpc_xprtyou'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:
nfs41_check_expired_locks(9)nfs41_check_open_stateid(9)nfs4_proc_get_rootfh(9)nfs4_proc_setclientid(9)nfs4_proc_setclientid_confirm(9)nfs4_proc_get_locations(9)nfs4_proc_fsid_present(9)nfs41_test_stateid(9)nfs41_free_stateid(9)
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
- 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