pnfs_mark_ma...segs_invalid(9)
β¨ pnfs_mark_ma...segs_invalid(9) β¨
okay so bestie, welcome to the Kernel API Manual β yes, the man page header literally abbreviates the function name with ... because apparently even the kernel docs got tired mid-word π anyway this one's about pnfs_mark_matching_lsegs_invalid, which is giving cleanup crew main character energy π§Ήβ¨
π NAME π
pnfs_mark_matching_lsegs_invalid β tear down lsegs or mark them for later π
(yes, that's the whole vibe: destroy now, or vibe-check later)
πΈ SYNOPSIS πΈ
int pnfs_mark_matching_lsegs_invalid (struct pnfs_layout_hdr *lo ,
struct list_head *tmp_list , const struct pnfs_layout_range
*recall_range , u32 seq );
fr fr copy that signature exactly, the kernel does not do "close enough" π«Ά
π¦ ARGUMENTS π¦
loβ the layout header that's holding all the lsegs. this is the home base we're scanning, bestie πtmp_listβ a list head where the doomed lsegs get sent. think of it as the naughty list</bad> β sorry, the doomed list πrecall_rangeβ optional recall range to match against, and it may beNULL(so like, no filter, match whatever, we love a flexible queen) πseqβ only invalidate lsegs obtained prior to this sequence β and it may be0β¨
π DESCRIPTION π
So the whole thing: we walk the list of lsegs inside the layout header lo, and we tear down any of them that should get destroyed. that's it, that's the job π«‘
The matching rules, no cap:
- if
recall_rangeis specified, then the segment must match that range β no range match, no teardown π« - if
seqis non-zero, then we only match segments that were handed out at or before that sequence β³ - and if
recall_rangeisNULL/seqis0, those filters just aren't applied (see the ARGUMENTS notes above, iykyk) π
Then it returns the number of matching invalid lsegs remaining in the list after scanning it and purging them. so like, you get a little receipt of how many are still hanging around post-cleanup π§Ύβ¨
lowkey important: it's the count remaining after the purge, not the count of things it killed. don't @ me, that's just what it says π
π SEE ALSO π
- Kernel file
./fs/nfs/pnfs.cπ pnfs_mark_matching_lsegs_return(9)β the sibling function, go say hi π«Ά
and that's the whole page, bestie π mwah π
sign-off: this icon of a man page comes from ./fs/nfs, dated October 2026, and honestly? she ate. 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