diff options
author | Chunwei Chen <[email protected]> | 2016-11-30 13:56:50 -0800 |
---|---|---|
committer | Chunwei Chen <[email protected]> | 2016-12-01 14:52:48 -0800 |
commit | 57ddcda1647daac93057dd520a9dc5187c643264 (patch) | |
tree | d68cf5f2f862e7c48db89c4ef515798f37219b2b /module/zfs/spa.c | |
parent | 616fa7c02b0cc373f011998f56ed53bb37742d13 (diff) |
Use system_delay_taskq for long delay tasks
Use it for spa_deadman, zpl_posix_acl_free, snapentry_expire.
This free system_taskq from the above long delay tasks, and allow us to do
taskq_wait_outstanding on system_taskq without being blocked forever, making
system_taskq more generic and useful.
Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 05e15a2e6..9f652dc32 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -1208,7 +1208,7 @@ spa_deactivate(spa_t *spa) list_destroy(&spa->spa_evicting_os_list); list_destroy(&spa->spa_state_dirty_list); - taskq_cancel_id(system_taskq, spa->spa_deadman_tqid); + taskq_cancel_id(system_delay_taskq, spa->spa_deadman_tqid); for (t = 0; t < ZIO_TYPES; t++) { for (q = 0; q < ZIO_TASKQ_TYPES; q++) { @@ -6517,8 +6517,8 @@ spa_sync(spa_t *spa, uint64_t txg) tx = dmu_tx_create_assigned(dp, txg); spa->spa_sync_starttime = gethrtime(); - taskq_cancel_id(system_taskq, spa->spa_deadman_tqid); - spa->spa_deadman_tqid = taskq_dispatch_delay(system_taskq, + taskq_cancel_id(system_delay_taskq, spa->spa_deadman_tqid); + spa->spa_deadman_tqid = taskq_dispatch_delay(system_delay_taskq, spa_deadman, spa, TQ_SLEEP, ddi_get_lbolt() + NSEC_TO_TICK(spa->spa_deadman_synctime)); @@ -6706,7 +6706,7 @@ spa_sync(spa_t *spa, uint64_t txg) } dmu_tx_commit(tx); - taskq_cancel_id(system_taskq, spa->spa_deadman_tqid); + taskq_cancel_id(system_delay_taskq, spa->spa_deadman_tqid); spa->spa_deadman_tqid = 0; /* |