gfs2_bitcount(9)
π gfs2_bitcount(9) β a Kernel API Manual moment β¨
okay so bestie, welcome to the gfs2_bitcount(9) page, which is part of the Kernel API Manual β yes, the kernel has a manual, and yes, it's iconic. sit down, hydrate, and let's get into it π«Ά
πΈ NAME πΈ
gfs2_bitcount β literally just counts the number of bits in a certain state. that's it. that's the whole job. she's a specialist π
β¨ SYNOPSIS β¨
u32 gfs2_bitcount (struct gfs2_rgrpd *rgd , const u8 *buffer , unsigned
int buflen , u8 state );
look at her. four args, returns a u32. no notes. π₯
π ARGUMENTS π
rgdβ the resource group descriptor. she's the main character, the context, the whole vibe check for the operation πbufferβ the buffer that holds the bitmaps. the actual bits live in here, no cap π¦buflenβ the length (in bytes) of the buffer. important note: bytes, not bits, don't come for me πstateβ the state of the block we're looking for. we're counting bits that are in this state specifically, so pick your state wisely bestie π―
β RETURN β
The number of bits. that's the whole return value. she counted, she returned, she left. periodt π
π SEE ALSO π
okay this list is LONG, so buckle up β the kernel file is ./fs/gfs2/rgrp.c and here's everyone she's friends with (all of them (9), all of them relevant, all of them listed, no skips, i would never π):
gfs2_setbit(9)gfs2_testbit(9)gfs2_bit_search(9)rs_cmp(9)gfs2_bitfit(9)gfs2_rbm_from_block(9)gfs2_rbm_add(9)gfs2_unaligned_extlen(9)gfs2_free_extlen(9)gfs2_rgrp_verify(9)gfs2_blk2rgrpd(9)gfs2_rgrpd_get_first(9)gfs2_rgrpd_get_next(9)__rs_deltree(9)gfs2_rs_deltree(9)gfs2_rs_delete(9)return_all_reservations(9)compute_bitstructs(9)gfs2_ri_total(9)read_rindex_entry(9)set_rgrp_preferences(9)gfs2_ri_update(9)gfs2_rindex_update(9)gfs2_rgrp_go_instantiate(9)gfs2_rgrp_brelse(9)gfs2_fitrim(9)rs_insert(9)rgd_free(9)rg_mblk_search(9)gfs2_next_unreserved_block(9)gfs2_reservation_check_and_update(9)gfs2_rbm_find(9)try_rgrp_unlink(9)gfs2_rgrp_congested(9)gfs2_rgrp_used_recently(9)fast_to_acquire(9)gfs2_inplace_reserve(9)gfs2_inplace_release(9)gfs2_alloc_extent(9)rgblk_free(9)gfs2_rgrp_dump(9)gfs2_adjust_reservation(9)gfs2_set_alloc_start(9)gfs2_alloc_blocks(9)__gfs2_free_blocks(9)gfs2_free_meta(9)gfs2_check_blk_type(9)gfs2_rlist_add(9)gfs2_rlist_alloc(9)gfs2_rlist_free(9)
like i said. long list. she knows everyone ππ
that's the whole page bestie, you ate that π this gem lives over in ./fs/gfs2 and the version/date stamp on it is October 2026 β so go forth, count those bits, and slay π
β¨π§
π¦ 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