generic_check_addressable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… generic_check_addressable(9) β€” a Kernel API Manual moment

okay so bestie, welcome to generic_check_addressable(9), straight out of the Kernel API Manual. It's one tiny function, it's in ./fs/libfs.c, and it has exactly one job. Lowkey iconic of it tbh πŸŽ€


✨ NAME ✨

generic_check_addressable β€” the vibe check for whether your file system is actually addressable 🌸


✨ SYNOPSIS ✨

int generic_check_addressable (unsigned blocksize_bits , u64 num_blocks );

✨ ARGUMENTS ✨

  • blocksize_bits β€” bestie this is the log of your file system block size. Not the block size itself, the log of it. Read the room 😭
  • num_blocks β€” the number of blocks in your file system, typed as u64 because we're being fancy πŸ’…

✨ DESCRIPTION ✨

So here's the tea 🍡 β€” this function figures out whether a file system with num_blocks blocks (and a block size of 2**blocksize_bits, yes, that's the whole reason the argument is a log 😌) can actually be addressed by the system's sector_t and page cache.

Return value stays in its lane:

  • 0 if it's all good, it's addressable, slay πŸŽ‰
  • -EFBIG otherwise, i.e. too big, no cap πŸ’€

That's genuinely it. Small function, big "am I going to fit in memory" energy πŸ‘‘


✨ SEE ALSO ✨

All the neighbours from the Kernel file ./fs/libfs.c β€” a whole group chat of (9) pages, fr fr 🫢


ngl, go read them all if you want the full libfs lore 🌈

okay that's the whole page, mwah πŸ’– this one came from the source ./fs, dated October 2026, and it's the generic_check_addressable(9) manual page β€” periodt. πŸ¦‹

πŸ“¦ where this page comes from