hfsplus_submit_bio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of HFSPLUS_SECTOR_SIZE bytes. 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