Lines Matching refs:spa
318 spa_t *spa = zio->io_spa; in vdev_queue_io_add() local
324 mutex_enter(&spa->spa_iokstat_lock); in vdev_queue_io_add()
325 spa->spa_queue_stats[zio->io_priority].spa_queued++; in vdev_queue_io_add()
326 if (spa->spa_iokstat != NULL) in vdev_queue_io_add()
327 kstat_waitq_enter(spa->spa_iokstat->ks_data); in vdev_queue_io_add()
328 mutex_exit(&spa->spa_iokstat_lock); in vdev_queue_io_add()
334 spa_t *spa = zio->io_spa; in vdev_queue_io_remove() local
340 mutex_enter(&spa->spa_iokstat_lock); in vdev_queue_io_remove()
341 ASSERT3U(spa->spa_queue_stats[zio->io_priority].spa_queued, >, 0); in vdev_queue_io_remove()
342 spa->spa_queue_stats[zio->io_priority].spa_queued--; in vdev_queue_io_remove()
343 if (spa->spa_iokstat != NULL) in vdev_queue_io_remove()
344 kstat_waitq_exit(spa->spa_iokstat->ks_data); in vdev_queue_io_remove()
345 mutex_exit(&spa->spa_iokstat_lock); in vdev_queue_io_remove()
351 spa_t *spa = zio->io_spa; in vdev_queue_pending_add() local
357 mutex_enter(&spa->spa_iokstat_lock); in vdev_queue_pending_add()
358 spa->spa_queue_stats[zio->io_priority].spa_active++; in vdev_queue_pending_add()
359 if (spa->spa_iokstat != NULL) in vdev_queue_pending_add()
360 kstat_runq_enter(spa->spa_iokstat->ks_data); in vdev_queue_pending_add()
361 mutex_exit(&spa->spa_iokstat_lock); in vdev_queue_pending_add()
367 spa_t *spa = zio->io_spa; in vdev_queue_pending_remove() local
373 mutex_enter(&spa->spa_iokstat_lock); in vdev_queue_pending_remove()
374 ASSERT3U(spa->spa_queue_stats[zio->io_priority].spa_active, >, 0); in vdev_queue_pending_remove()
375 spa->spa_queue_stats[zio->io_priority].spa_active--; in vdev_queue_pending_remove()
376 if (spa->spa_iokstat != NULL) { in vdev_queue_pending_remove()
377 kstat_io_t *ksio = spa->spa_iokstat->ks_data; in vdev_queue_pending_remove()
379 kstat_runq_exit(spa->spa_iokstat->ks_data); in vdev_queue_pending_remove()
388 mutex_exit(&spa->spa_iokstat_lock); in vdev_queue_pending_remove()
432 vdev_queue_max_async_writes(spa_t *spa) in vdev_queue_max_async_writes() argument
435 uint64_t dirty = spa->spa_dsl_pool->dp_dirty_total; in vdev_queue_max_async_writes()
445 if (spa_has_pending_synctask(spa)) { in vdev_queue_max_async_writes()
471 vdev_queue_class_max_active(spa_t *spa, zio_priority_t p) in vdev_queue_class_max_active() argument
481 return (vdev_queue_max_async_writes(spa)); in vdev_queue_class_max_active()
502 spa_t *spa = vq->vq_vdev->vdev_spa; in vdev_queue_class_to_issue() local
523 vdev_queue_class_max_active(spa, p)) in vdev_queue_class_to_issue()
890 spa_t *spa = zio->io_spa; in vdev_queue_change_io_priority() local
897 mutex_enter(&spa->spa_iokstat_lock); in vdev_queue_change_io_priority()
898 ASSERT3U(spa->spa_queue_stats[oldpri].spa_queued, >, 0); in vdev_queue_change_io_priority()
899 spa->spa_queue_stats[oldpri].spa_queued--; in vdev_queue_change_io_priority()
900 spa->spa_queue_stats[zio->io_priority].spa_queued++; in vdev_queue_change_io_priority()
901 mutex_exit(&spa->spa_iokstat_lock); in vdev_queue_change_io_priority()