MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_queue_pending_add

Function vdev_queue_pending_add

freebsd/contrib/openzfs/module/zfs/vdev_queue.c:564–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564static void
565vdev_queue_pending_add(vdev_queue_t *vq, zio_t *zio)
566{
567 spa_t *spa = zio->io_spa;
568 spa_history_kstat_t *shk = &spa->spa_stats.io_history;
569
570 ASSERT(MUTEX_HELD(&vq->vq_lock));
571 ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE);
572 vq->vq_class[zio->io_priority].vqc_active++;
573 if (vdev_queue_is_interactive(zio->io_priority)) {
574 if (++vq->vq_ia_active == 1)
575 vq->vq_nia_credit = 1;
576 } else if (vq->vq_ia_active > 0) {
577 vq->vq_nia_credit--;
578 }
579 avl_add(&vq->vq_active_tree, zio);
580
581 if (shk->kstat != NULL) {
582 mutex_enter(&shk->lock);
583 kstat_runq_enter(shk->kstat->ks_data);
584 mutex_exit(&shk->lock);
585 }
586}
587
588static void
589vdev_queue_pending_remove(vdev_queue_t *vq, zio_t *zio)

Callers 1

vdev_queue_io_to_issueFunction · 0.85

Calls 5

avl_addFunction · 0.85
mutex_enterFunction · 0.85
mutex_exitFunction · 0.85
kstat_runq_enterFunction · 0.50

Tested by

no test coverage detected