befs_fblock2brun(9)
β¨ befs_fblock2brun β¨
okay so bestie, this is a page from the Kernel API Manual (that's the befs_fblock2brun(9) manual section 9, kernel devs only π
) and it's honestly so much simpler than it looks. it's literally just: "here's a file position, gimme the block run" π
πΈ NAME πΈ
befs_fblock2brun β give back block run for fblock
like, it takes a block number and hands you back the run. that's the whole vibe. no cap.
π¦ SYNOPSIS π¦
int befs_fblock2brun (struct super_block *sb , const befs_data_stream
*data , befs_blocknr_t fblock , befs_block_run *run );
copy it exactly like that bestie, don't be out here editing signatures π
π ARGUMENTS π
sbβ the superblock. yeah, that superblock. the big one πdataβ datastream to read from. this is where we're pulling the info from π«Άfblockβ the blocknumber with the file position to find. you bring the block number, it does the finding βrunβ The found run is passed back through this pointer. so like, this is the output slot β the answer gets dropped in here on the way out π
π₯ DESCRIPTION π₯
Takes a file position and gives back a brun who's starting block is block number fblock of the file.
(the original literally says "who's" instead of "whose" β not me fixing it, that's canon, iykyk π)
Returns BEFS_OK or BEFS_ERR. those are your two moods. success or the other thing π
Calls specialized functions for each of the three possible datastream regions. three regions, three specialized functions, one very organized little function. it's giving delegation. it's giving "i don't do the work myself, i know a girl who does" π
π SEE ALSO π
- Kernel file
./fs/befs/datastream.cβ where this whole situation lives befs_read_datastream(9)befs_count_blocks(9)befs_find_brun_direct(9)befs_find_brun_indirect(9)befs_find_brun_dblindirect(9)
all the brun-finding girlies, in one place. go read them, they're iconic π
quick reminder that this is kernel API stuff, so it's (9) section β not your everyday userland manpage. treat it with the respect it deserves but also it's literally just block math π
and that's the page!! this one's from the Linux Kernel API Manual, lives in ./fs/befs, dated October 2026, and is filed under befs_fblock2brun(9) π§ββοΈ byeee, go find some bruns π
π¦ 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