aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blk-cgroup.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-02 10:46:15 -0400
committerJens Axboe <axboe@kernel.dk>2018-11-07 15:42:33 -0500
commitdb6d995235606191fa9db0c717e9d843200b71ea (patch)
tree830c338347842ac1b0de76d86fbee6bfd7ff9b32 /include/linux/blk-cgroup.h
parent1028e4b335665290dc563d5272f3c6b84e7fd66e (diff)
block: remove request_list code
It's now dead code, nobody uses it. Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-cgroup.h')
-rw-r--r--include/linux/blk-cgroup.h97
1 files changed, 0 insertions, 97 deletions
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 6d766a19f2bb..1b299e025e83 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -122,9 +122,6 @@ struct blkcg_gq {
122 /* all non-root blkcg_gq's are guaranteed to have access to parent */ 122 /* all non-root blkcg_gq's are guaranteed to have access to parent */
123 struct blkcg_gq *parent; 123 struct blkcg_gq *parent;
124 124
125 /* request allocation list for this blkcg-q pair */
126 struct request_list rl;
127
128 /* reference count */ 125 /* reference count */
129 atomic_t refcnt; 126 atomic_t refcnt;
130 127
@@ -515,94 +512,6 @@ static inline void blkg_put(struct blkcg_gq *blkg)
515 if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \ 512 if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
516 (p_blkg)->q, false))) 513 (p_blkg)->q, false)))
517 514
518/**
519 * blk_get_rl - get request_list to use
520 * @q: request_queue of interest
521 * @bio: bio which will be attached to the allocated request (may be %NULL)
522 *
523 * The caller wants to allocate a request from @q to use for @bio. Find
524 * the request_list to use and obtain a reference on it. Should be called
525 * under queue_lock. This function is guaranteed to return non-%NULL
526 * request_list.
527 */
528static inline struct request_list *blk_get_rl(struct request_queue *q,
529 struct bio *bio)
530{
531 struct blkcg *blkcg;
532 struct blkcg_gq *blkg;
533
534 rcu_read_lock();
535
536 blkcg = bio_blkcg(bio);
537
538 /* bypass blkg lookup and use @q->root_rl directly for root */
539 if (blkcg == &blkcg_root)
540 goto root_rl;
541
542 /*
543 * Try to use blkg->rl. blkg lookup may fail under memory pressure
544 * or if either the blkcg or queue is going away. Fall back to
545 * root_rl in such cases.
546 */
547 blkg = blkg_lookup(blkcg, q);
548 if (unlikely(!blkg))
549 goto root_rl;
550
551 blkg_get(blkg);
552 rcu_read_unlock();
553 return &blkg->rl;
554root_rl:
555 rcu_read_unlock();
556 return &q->root_rl;
557}
558
559/**
560 * blk_put_rl - put request_list
561 * @rl: request_list to put
562 *
563 * Put the reference acquired by blk_get_rl(). Should be called under
564 * queue_lock.
565 */
566static inline void blk_put_rl(struct request_list *rl)
567{
568 if (rl->blkg->blkcg != &blkcg_root)
569 blkg_put(rl->blkg);
570}
571
572/**
573 * blk_rq_set_rl - associate a request with a request_list
574 * @rq: request of interest
575 * @rl: target request_list
576 *
577 * Associate @rq with @rl so that accounting and freeing can know the
578 * request_list @rq came from.
579 */
580static inline void blk_rq_set_rl(struct request *rq, struct request_list *rl)
581{
582 rq->rl = rl;
583}
584
585/**
586 * blk_rq_rl - return the request_list a request came from
587 * @rq: request of interest
588 *
589 * Return the request_list @rq is allocated from.
590 */
591static inline struct request_list *blk_rq_rl(struct request *rq)
592{
593 return rq->rl;
594}
595
596struct request_list *__blk_queue_next_rl(struct request_list *rl,
597 struct request_queue *q);
598/**
599 * blk_queue_for_each_rl - iterate through all request_lists of a request_queue
600 *
601 * Should be used under queue_lock.
602 */
603#define blk_queue_for_each_rl(rl, q) \
604 for ((rl) = &(q)->root_rl; (rl); (rl) = __blk_queue_next_rl((rl), (q)))
605
606static inline int blkg_stat_init(struct blkg_stat *stat, gfp_t gfp) 515static inline int blkg_stat_init(struct blkg_stat *stat, gfp_t gfp)
607{ 516{
608 int ret; 517 int ret;
@@ -939,12 +848,6 @@ static inline char *blkg_path(struct blkcg_gq *blkg) { return NULL; }
939static inline void blkg_get(struct blkcg_gq *blkg) { } 848static inline void blkg_get(struct blkcg_gq *blkg) { }
940static inline void blkg_put(struct blkcg_gq *blkg) { } 849static inline void blkg_put(struct blkcg_gq *blkg) { }
941 850
942static inline struct request_list *blk_get_rl(struct request_queue *q,
943 struct bio *bio) { return &q->root_rl; }
944static inline void blk_put_rl(struct request_list *rl) { }
945static inline void blk_rq_set_rl(struct request *rq, struct request_list *rl) { }
946static inline struct request_list *blk_rq_rl(struct request *rq) { return &rq->q->root_rl; }
947
948static inline bool blkcg_bio_issue_check(struct request_queue *q, 851static inline bool blkcg_bio_issue_check(struct request_queue *q,
949 struct bio *bio) { return true; } 852 struct bio *bio) { return true; }
950 853