summaryrefslogtreecommitdiffstats
path: root/module/zfs/metaslab.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-06-05 11:26:35 -0700
committerBrian Behlendorf <[email protected]>2015-06-11 10:27:25 -0700
commitc5528b9ba622421a213e128704de4090fa0db773 (patch)
tree8da399689252cb85f084a33e05a60c8a3f8ffb74 /module/zfs/metaslab.c
parent4f34bd9792bad1affe5b93aeef406fd7dc2df0f8 (diff)
Use taskq_wait_outstanding() function
Replace taskq_wait() with taskq_wait_oustanding(). This way callers will only block until previously submitted tasks have been completed. This was the previous behavior of task_wait() prior to the introduction of taskq_wait_outstanding() so this isn't really a functionalty change for these callers. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/metaslab.c')
-rw-r--r--module/zfs/metaslab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 164b6b87e..7ff1a4f5a 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -556,7 +556,7 @@ metaslab_group_passivate(metaslab_group_t *mg)
return;
}
- taskq_wait(mg->mg_taskq);
+ taskq_wait_outstanding(mg->mg_taskq, 0);
metaslab_group_alloc_update(mg);
mgprev = mg->mg_prev;
@@ -1596,7 +1596,7 @@ metaslab_group_preload(metaslab_group_t *mg)
int m = 0;
if (spa_shutting_down(spa) || !metaslab_preload_enabled) {
- taskq_wait(mg->mg_taskq);
+ taskq_wait_outstanding(mg->mg_taskq, 0);
return;
}