Skip to content

Commit

Permalink
Fix spa_deadman() TQ_SLEEP warning
Browse files Browse the repository at this point in the history
The spa_deadman() and spa_sync() functions can both be run in the
spa_sync context and therefore should use TQ_PUSHPAGE instead of
TQ_SLEEP.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1734
Closes #1749
  • Loading branch information
behlendorf committed Sep 25, 2013
1 parent f9f3f1e commit cbfa294
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion module/zfs/spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -6144,7 +6144,7 @@ spa_sync(spa_t *spa, uint64_t txg)
spa->spa_sync_starttime = gethrtime();
taskq_cancel_id(system_taskq, spa->spa_deadman_tqid);
spa->spa_deadman_tqid = taskq_dispatch_delay(system_taskq,
spa_deadman, spa, TQ_SLEEP, ddi_get_lbolt() +
spa_deadman, spa, TQ_PUSHPAGE, ddi_get_lbolt() +
NSEC_TO_TICK(spa->spa_deadman_synctime));

/*
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/spa_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ spa_deadman(void *arg)
vdev_deadman(spa->spa_root_vdev);

spa->spa_deadman_tqid = taskq_dispatch_delay(system_taskq,
spa_deadman, spa, TQ_SLEEP, ddi_get_lbolt() +
spa_deadman, spa, TQ_PUSHPAGE, ddi_get_lbolt() +
NSEC_TO_TICK(spa->spa_deadman_synctime));
}

Expand Down

0 comments on commit cbfa294

Please sign in to comment.