Skip to content

Commit

Permalink
spa: flatten spa_taskq_dispatch_ent()
Browse files Browse the repository at this point in the history
It is the only user of spa_taskq_dispatch_select(), so might as well
just carry it directly.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
  • Loading branch information
robn committed May 2, 2024
1 parent d00dea1 commit b82b88e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions module/zfs/spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,8 +1484,9 @@ spa_taskq_write_param(ZFS_MODULE_PARAM_ARGS)
* Note that a type may have multiple discrete taskqs to avoid lock contention
* on the taskq itself.
*/
static taskq_t *
spa_taskq_dispatch_select(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
void
spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent,
zio_t *zio)
{
spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q];
Expand All @@ -1502,15 +1503,7 @@ spa_taskq_dispatch_select(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
} else {
tq = tqs->stqs_taskq[((uint64_t)gethrtime()) % tqs->stqs_count];
}
return (tq);
}

void
spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent,
zio_t *zio)
{
taskq_t *tq = spa_taskq_dispatch_select(spa, t, q, zio);
taskq_dispatch_ent(tq, func, arg, flags, ent);
}

Expand Down

0 comments on commit b82b88e

Please sign in to comment.