HomeFreeBSD

metaslab: don't pass whole zio to throttle reserve APIs

Description

metaslab: don't pass whole zio to throttle reserve APIs

They only need a couple of fields, and passing the whole thing just
invites fiddling around inside it, like modifying flags, which then
makes it much harder to understand the zio state from inside zio.c.

We move the flag update to just after a successful throttle in zio.c.

Rename ZIO_FLAG_IO_ALLOCATING to ZIO_FLAG_ALLOC_THROTTLED
Better describes what it means, and makes it look less like
IO_IS_ALLOCATING, which means something different.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17508

Details

Provenance
rob.norris_klarasystems.comAuthored on Jul 5 2025, 3:22 AM
GitHub <noreply@github.com>Committed on Jul 5 2025, 3:22 AM
Parents
rG92d3b4ee2c08: zio: rename `io_reexecute` as `io_post`; use it for the direct IO checksum…
Branches
Unknown
Tags
Unknown