dm_bio_rewind(9)
π« 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 thatbiohas a fixed end sector, to allow rewinding from end of bio and restoring its original position. Caller is also responsibile for restoringbio'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
biohas 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 π¦
- Kernel file
./drivers/md/dm-io-rewind.c dm_bio_integrity_rewind(9)β her cousin, also rewinding, also slaying π
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
- 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