generic_check_addressable(9)
π 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 asu64because 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:
0if it's all good, it's addressable, slay π-EFBIGotherwise, 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 π«Ά
simple_offset_init(9)simple_offset_add(9)simple_offset_remove(9)simple_offset_rename(9)simple_offset_rename_exchange(9)simple_offset_destroy(9)offset_dir_llseek(9)offset_readdir(9)simple_rename_timestamp(9)simple_setattr(9)simple_write_end(9)simple_read_from_buffer(9)simple_write_to_buffer(9)memory_read_from_buffer(9)generic_encode_ino32_fh(9)generic_fh_to_dentry(9)generic_fh_to_parent(9)simple_fsync_noflush(9)simple_fsync(9)simple_get_link(9)generic_ci_d_compare(9)generic_ci_d_hash(9)generic_ci_match(9)generic_set_sb_d_ops(9)inode_maybe_inc_iversion(9)inode_query_iversion(9)simple_inode_init_ts(9)path_from_stashed(9)simple_start_creating(9)
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
- 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