ocfs2_resv_discard(9)
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, typedstruct 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, typedstruct 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:
ocfs2_resmap_init(9)ocfs2_resmap_restart(9)ocfs2_resmap_uninit(9)ocfs2_resmap_resv_bits(9)ocfs2_resmap_claimed_bits(9)
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
- 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