staticinlinevoid rq_qos_done_bio(struct bio *bio)
{ struct request_queue *q;
if (!bio->bi_bdev || (!bio_flagged(bio, BIO_QOS_THROTTLED) &&
!bio_flagged(bio, BIO_QOS_MERGED))) return;
q = bdev_get_queue(bio->bi_bdev);
/* * A BIO may carry BIO_QOS_* flags even if the associated request_queue * does not have rq_qos enabled. This can happen with stacked block * devices — for example, NVMe multipath, where it's possible that the * bottom device has QoS enabled but the top device does not. Therefore, * always verify that q->rq_qos is present and QoS is enabled before * calling __rq_qos_done_bio().
*/ if (test_bit(QUEUE_FLAG_QOS_ENABLED, &q->queue_flags) && q->rq_qos)
__rq_qos_done_bio(q->rq_qos, bio);
}
staticinlinevoid rq_qos_throttle(struct request_queue *q, struct bio *bio)
{ if (unlikely(test_bit(QUEUE_FLAG_QOS_ENABLED, &q->queue_flags)) &&
q->rq_qos) {
bio_set_flag(bio, BIO_QOS_THROTTLED);
__rq_qos_throttle(q->rq_qos, bio);
}
}
staticinlinevoid rq_qos_track(struct request_queue *q, struct request *rq, struct bio *bio)
{ if (unlikely(test_bit(QUEUE_FLAG_QOS_ENABLED, &q->queue_flags)) &&
q->rq_qos)
__rq_qos_track(q->rq_qos, rq, bio);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.