dm_bio_rewind(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« dm_bio_rewind (Kernel API Manual, bestie edition) πŸ’«

okay so this is dm_bio_rewind(9) from the kernel API manual and honestly? it's giving "tiny function, big responsibilities." let's get into it 🫢


✨ NAME ✨

dm_bio_rewind β€” update ->bi_iter of @bio by rewinding @bytes.

that's it. that's the whole job. it rewinds the iterator on a bio. iconic, minimal, no notes πŸ’…


🌸 SYNOPSIS 🌸

void dm_bio_rewind (struct bio *bio , unsigned int bytes );

look at her. void, so she returns nothing, she just does. main character energy fr fr ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • bio β€” the bio you want to rewind, bestie. that's the one we're working on πŸ’–
  • bytes β€” how many bytes to rewind. yes, exactly that many. count them. 🧚

⭐ DESCRIPTION ⭐

WARNING: Caller must ensure that bio has a fixed end sector, to allow rewinding from end of bio and restoring its original position. Caller is also responsibile for restoring bio's size.

no cap, this is the whole thing and it's important 😭 β€” so let me spell it out:

  • the caller has to make sure bio has a fixed end sector. that's non-negotiable, because that's what lets you rewind from the end of the bio and then restore its original position.
  • the caller is also responsible for restoring bio's size.

so like... this function does the rewinding, but you are the one holding the vibes together. it's a team effort, periodt πŸ‘‘

(also yes, the original manpage spells it "responsibile" β€” we're keeping it, character for character, because that's what the page says. not me fixing it. πŸ™ˆ)


πŸ¦‹ SEE ALSO πŸ¦‹


okay and that's the page!! source/version is ./drivers/md and the date on this baby is October 2026 β€” so like, future energy, but make it kernel πŸ•°οΈβœ¨ go forth, rewind responsibly, and remember: fixed end sector or it's a bad time πŸ’€πŸŽ€

πŸ“¦ where this page comes from