]> git.proxmox.com Git - mirror_zfs.git/commitdiff
spa: flatten spa_taskq_dispatch_ent()
authorRob Norris <rob.norris@klarasystems.com>
Thu, 2 May 2024 02:06:58 +0000 (12:06 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 May 2024 16:40:09 +0000 (09:40 -0700)
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.
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

module/zfs/spa.c

index a1258546c8cb235c603e1c91b46b10d8519bdd5b..930c527b63cd654c65fb269253d2225da97f8e98 100644 (file)
@@ -1490,8 +1490,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];
@@ -1508,15 +1509,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);
 }