sunrpc_cache...sts_snapshot(9)
π sunrpc_cache_requests_snapshot(9) π
okay bestie, welcome to the Kernel API Manual, section 9 β this one's all about grabbing a lil snapshot of the upcall requests that are still pending β¨
πΈ NAME πΈ
sunrpc_cache_requests_snapshot β literally just snapshot pending upcall requests. that's the whole vibe π«Ά
π SYNOPSIS π
int sunrpc_cache_requests_snapshot (struct cache_detail *cd , struct cache_head **items , u64 *seqnos , int max , u64 min_seqno );
π ARGUMENTS π
cdβ thecache_detailyou're querying. this is the main character of the operation πitemsβ an array you (yes, you, the caller) allocated, and it gets filled up withcache_headpointers π§seqnosβ another caller-allocated array, this one gets the sequence numbers dropped into it πmaxβ the size of those arrays. don't overfill, bestie, that's the whole point of this number πmin_seqnoβ only entries withseqno > min_seqnoget included. pass0and you get everything π
π¦ DESCRIPTION π¦
so here's the tea π only entries that have CACHE_PENDING set make it into the snapshot. no pending, no entry, periodt.
for each one it takes a reference on the cache_head via cache_get β so like, it's holding onto them for you π
which means you gotta call cache_put on every single returned item when you're done with it. every one. don't leave them hanging π
fr fr, remember the cache_put. that's not optional, that's the rules π«Ά
it returns the number of entries filled. that's it, that's the count π
β SEE ALSO β
- the kernel file
./net/sunrpc/cache.cβ go read it, iykyk π sunrpc_cache_requests_count(9)sunrpc_cache_notify(9)
and that's the page, bestie!! π brought to you straight out of ./net/sunrpc, dated October 2026 β same iconic header, same iconic footer, just with way more sparkle β¨π slay, go snapshot some requests π₯
π¦ 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