blkdev_report_zones_cached(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– blkdev_report_zones_cached β€” the Kernel API Manual, but make it cute πŸ’–

okay so bestie, this is a page out of the Kernel API Manual, and honestly? it's a little banger. it's about grabbing your zone info without bothering the actual hardware β€” like checking the group chat instead of calling everyone individually. slay. πŸŽ€


✨ NAME ✨

blkdev_report_zones_cached β€” get cached zones information πŸ¦‹

like, the zones you already know about. from the cache. no cap.


🌸 SYNOPSIS 🌸

int blkdev_report_zones_cached (struct block_device *bdev , sector_t
sector , unsigned int nr_zones , report_zones_cb cb , void *data );

that's the whole vibe check: it hands you back an int, takes a block device, a sector, a zone count, a callback, and some private data. five things. we love a clean signature. πŸ’…


🫢 ARGUMENTS 🫢

  • bdev β€” the target block device πŸ’Ώ like, the one you're actually curious about.
  • sector β€” the sector you wanna start reporting zones from. your little starting point. πŸ“
  • nr_zones β€” the maximum number of zones to report. it's a cap, not a promise, bestie. 🧒
  • cb β€” the callback function, called for each reported zone. one zone, one call, every time. πŸ”
  • data β€” private data for the callback function. your little stash of stuff to pass along. πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

okay so this one is similar to blkdev_report_zones BUT β€” and this is the whole point β€” instead of calling into the low level device driver to get the zone report from the device, it uses blkdev_get_zone_info to generate the report from the disk zone write plugs and zones condition array. 🧚✨

basically: no device driver gossip, we're just reading what we already wrote down. iconic behaviour, honestly.

⚠️ heads up! since calling this function without a callback does not make sense, cb must be specified. not optional. not "i'll add it later". must. periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, i'm obsessed with all of them:


and that's the page!! πŸ¦‹πŸ’– this little gem comes to you from ./block, dated October 2026, straight out of the Kernel API Manual. mwah. take care of her. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from