gfs2_check_blk_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gfs2_check_blk_type(9)

okay so this is a page from the Kernel API Manual β€” yes, the kernel has its own manual, and yes, it's iconic for that 🌈


✨ NAME ✨

gfs2_check_blk_type β€” literally just checking what type of block something is πŸ•΅οΈβ€β™€οΈ


🌸 SYNOPSIS 🌸

int gfs2_check_blk_type (struct gfs2_sbd *sdp , u64 no_addr , unsigned
int type );

like, that's the whole function signature bestie, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • sdp β€” The superblock πŸ‘‘ (the main character, fr)
  • no_addr β€” The block number we're checking, iykyk
  • type β€” The block type we are looking for πŸ”

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first: the inode glock of no_addr must be held. like, that's a requirement, not a suggestion 🫢

The type you check for is either GFS2_BLKST_DINODE or GFS2_BLKST_UNLINKED. And checking for type GFS2_BLKST_FREE or GFS2_BLKST_USED? that would make no sense πŸ’€ so don't, bestie.


⭐ RETURN ⭐

  • 0 β€” if the block type matches the expected type βœ… slay
  • -ESTALE β€” if it doesn't match 😭
  • -ve errno β€” if something went wrong while checking πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./fs/gfs2/rgrp.c β€” and here's the whole squad, fr fr:


πŸ’– and that's the whole thing! go check those block types, bestie β€” main character energy only πŸ§šβ€β™€οΈ

kisses, this page came from ./fs/gfs2 and it's dated October 2026 β€” periodt, that's a wrap πŸ“πŸ’œ

πŸ“¦ where this page comes from