hfsplus_submit_bio(9)
π NAME π
hfsplus_submit_bio β bestie, this is literally the block I/O function, no cap β¨
π SYNOPSIS π
int hfsplus_submit_bio (struct super_block *sb , sector_t sector ,
void *buf , void **data , blk_opf_t opf );
πΈ ARGUMENTS πΈ
sbβ the super block of the volume you're doing I/O on π like, this is the whole vibe of which filesystem we're talking to.sectorβ the block to read or write, measured in blocks ofHFSPLUS_SECTOR_SIZEbytes. yes queen, that's the unit π«Άbufβ the buffer for the I/O. where the data lives, basically β¨dataβ an output pointer that tells you where the requested data actually ended up. it's giving "surprise location reveal" πopfβ the I/O operation type and flags. read? write? the whole little outfit π₯
π¦ DESCRIPTION π¦
okay so the unit of I/O here is hfsplus_min_io_size(sb) β and ngl, that can be bigger than HFSPLUS_SECTOR_SIZE, so buf has to be sized accordingly. don't skimp on the buffer, bestie, it will not slay π
On reads, data returns a pointer to the start of the requested sector, which may not be the same location as buf. so likeβ¦ don't assume they're matching, because they're literally not π
If sector isn't aligned to the bdev logical block size, it gets rounded down. for writes, that means buf should contain data that starts at the rounded-down address. and here's the iconic part: as long as the data was read using hfsplus_submit_bio and the same buffer is used, things will work correctly. periodt π―
lowkey important: the alignment rounding-down is not a suggestion, it's what happens. for writes you must match your buffer to the rounded-down address or the whole thing gets weird π«
β RETURN β
0 on success β slay π β otherwise a -errno code, which is the kernel's way of saying "not today" π
π SEE ALSO π
- Kernel file
./fs/hfsplus/wrapper.cβ go read it, iykyk π
and that's the whole page, bestie! mwah π
this absolute icon of a manpage comes to you from ./fs/hfsplus, dated October 2026, and it's filed under hfsplus_submit_bio(9) β go off, kernel docs β¨π«Ά
π¦ 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