ocfs2_resv_discard(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're looking at a page from the Kernel API Manual, section 9 β€” yes, the fancy kernel one β€” and it's about ocfs2_resv_discard. it's short, it's sweet, and it does exactly one thing. let's get into it πŸ’…


πŸ’– NAME πŸ’–

ocfs2_resv_discard β€” truncate a reservation. that's it. that's the whole name section. short king behavior πŸ‘‘


✨ SYNOPSIS ✨

void ocfs2_resv_discard (struct ocfs2_reservation_map *resmap , struct
ocfs2_alloc_reservation *resv );

it returns void, so like… nothing comes back. it just Does The Thing and dips 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • resmap β€” the reservation map it's working with, typed struct ocfs2_reservation_map *. ngl the original page doesn't hand us a cute one-liner for this arg, so we're not gonna invent lore about it β€” it's the map, periodt.
  • resv β€” legit the reservation to truncate. that's the star of the show right there, typed struct ocfs2_alloc_reservation * 🌟

🌸 DESCRIPTION 🌸

okay so here's the tea β˜• β€” once you call this function, two things happen to that reservation, and they're both kind of a big deal:

  • the reservation will be empty πŸ’€
  • and it gets unlinked from the rbtree πŸŒ³βœ‚οΈ

like, fully out of the tree. not "hanging around in the background", not "on read" β€” unlinked. the reservation is empty and it is gone from the rbtree. that's the whole vibe of this function, and honestly? it ate. πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

the page points you at the kernel file ./fs/ocfs2/reservations.h, plus these iconic siblings:

go read them, iykyk 😌


and that's the whole page, bestie β€” no cap, it's a short one. this lil beauty lives over in ./fs/ocfs2 and it's dated October 2026, so mark your calendar πŸ—“οΈβœ¨ mwah, go truncate something responsibly πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from