pnfs_mark_ma...segs_invalid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 be NULL (so like, no filter, match whatever, we love a flexible queen) πŸ™ˆ
  • seq β€” only invalidate lsegs obtained prior to this sequence β€” and it may be 0 ✨

πŸ’– 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_range is specified, then the segment must match that range β€” no range match, no teardown 🚫
  • if seq is non-zero, then we only match segments that were handed out at or before that sequence ⏳
  • and if recall_range is NULL / seq is 0, 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 πŸ‘‘


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