bio_integrity_intervals(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Hey bestie πŸ’– welcome to bio_integrity_intervals(9) from the Kernel API Manual β€” this is the little kernel function that does a unit conversion and honestly? it ate. ✨

🌸 NAME 🌸

bio_integrity_intervals β€” Return number of integrity intervals for a bio. That's the whole assignment, no cap. πŸ’…

✨ SYNOPSIS ✨

unsigned int bio_integrity_intervals (struct blk_integrity *bi ,
       unsigned int sectors );

πŸŽ€ ARGUMENTS πŸŽ€

  • bi β€” blk_integrity profile for device. Like, the profile that belongs to the device, bestie. 🫢
  • sectors β€” Size of the bio in 512-byte sectors. Actual 512-byte sectors, not vibes. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the situation: the block layer calculates everything in 512 byte sectors, but integrity metadata is done in terms of the data integrity interval size of the storage device. Different units, same main character energy. 😭

This function does the translation β€” it converts the block layer sectors to the appropriate number of integrity intervals. It's giving "math but make it kernel," and it's iconic. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/linux/blk-integrity.h β€” go read the header, iykyk. πŸ“–βœ¨

Signed off with love from the source/version ./include/linux, dated October 2026, and this was bio_integrity_intervals(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from