HomeFreeBSD

spa_taskq_dispatch_ent: simplify arguments

Description

spa_taskq_dispatch_ent: simplify arguments

This renames it to spa_taskq_dispatch(), and reduces and simplifies its
arguments based on these observations from its two call sites:

  • arg is always the zio, so it can be typed that way, and we don't need to provide it twice;
  • ent is always &zio->io_tqent, and zio is always provided, so we can use it directly;
  • the only flag used is TQ_FRONT, which can just be a bool;
  • zio != NULL was part of the "use allocator" test, but it never would have got that far, because that arg was only set to NULL in the reexecute path, which is forced to type CLAIM, so the condition would fail at t == WRITE anyway.

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

Details

Provenance
rob.norris_klarasystems.comAuthored on May 2 2024, 2:13 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 14 2024, 4:40 PM
Parents
rG515c4dd2130a: spa: flatten spa_taskq_dispatch_ent()
Branches
Unknown
Tags
Unknown