gfs2_testbit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ gfs2_testbit(9) β€” test a bit in the bitmaps

okay so bestie, this is a page straight out of the Kernel API Manual, and it's about peeking at a single bit inside the GFS2 bitmaps. tiny function, huge responsibilities. no cap. πŸ’…


✨ NAME ✨

gfs2_testbit β€” test a bit in the bitmaps

like, literally just ✨checking one bit✨. that's the whole gig. πŸŽ€


🌸 SYNOPSIS 🌸

u8 gfs2_testbit (const struct gfs2_rbm *rbm , bool use_clone );

πŸ’– ARGUMENTS πŸ’–

  • rbm β€” the bit to test 🫢 this is the const struct gfs2_rbm * and yeah, it's pointing at exactly which bit we're checking, no guessing.
  • use_clone β€” if this is true, you're testing the clone bitmap, not the official bitmap. like the understudy bitmap. the vibes-only bitmap. 🌈

🧚 DESCRIPTION 🧚

okay so some callers β€” hi, gfs2_unaligned_extlen, we see you β€” need to test the clone bitmaps instead of the "real" bitmaps. and why? to avoid allocating recently freed blocks, that's why. 🚫🧱

it's giving "don't hand out a room that someone just checked out of, the sheets aren't even changed yet." periodt. πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

the two bit block state of the requested bit, returned as a u8. that's your vibe check result, bestie β€” go read it. πŸ’€


🌟 SEE ALSO 🌟

so, uh, this function rolls with a massive friend group. kernel file ./fs/gfs2/rgrp.c is where they all hang out, and here's the whole squad, no one left behind:


and that's the whole page, bestie!! πŸ“ source ./fs/gfs2, dated October 2026, and the page is gfs2_testbit(9) β€” go forth and test those bits, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from