From 5d09adc84f744bcda632c12ad88f2fe16b688c54 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 2 May 2024 12:06:58 +1000 Subject: [PATCH] spa: flatten spa_taskq_dispatch_ent() 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 --- module/zfs/spa.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 93599eefc8..2ca1b9ada1 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -1489,8 +1489,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]; @@ -1507,15 +1508,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); }