Lines Matching refs:bio
278 static inline struct blkcg *__bio_blkcg(struct bio *bio) in __bio_blkcg() argument
280 if (bio && bio->bi_blkg) in __bio_blkcg()
281 return bio->bi_blkg->blkcg; in __bio_blkcg()
293 static inline struct blkcg *bio_blkcg(struct bio *bio) in bio_blkcg() argument
295 if (bio && bio->bi_blkg) in bio_blkcg()
296 return bio->bi_blkg->blkcg; in bio_blkcg()
331 static inline bool bio_issue_as_root_blkg(struct bio *bio) in bio_issue_as_root_blkg() argument
333 return (bio->bi_opf & (REQ_META | REQ_SWAP)) != 0; in bio_issue_as_root_blkg()
705 struct bio *bio);
708 struct bio *bio) { return false; } in blk_throtl_bio() argument
711 bool __blkcg_punt_bio_submit(struct bio *bio);
713 static inline bool blkcg_punt_bio_submit(struct bio *bio) in blkcg_punt_bio_submit() argument
715 if (bio->bi_opf & REQ_CGROUP_PUNT) in blkcg_punt_bio_submit()
716 return __blkcg_punt_bio_submit(bio); in blkcg_punt_bio_submit()
721 static inline void blkcg_bio_issue_init(struct bio *bio) in blkcg_bio_issue_init() argument
723 bio_issue_init(&bio->bi_issue, bio_sectors(bio)); in blkcg_bio_issue_init()
727 struct bio *bio) in blkcg_bio_issue_check() argument
734 if (!bio->bi_blkg) { in blkcg_bio_issue_check()
739 bio_devname(bio, b)); in blkcg_bio_issue_check()
740 bio_associate_blkg(bio); in blkcg_bio_issue_check()
743 blkg = bio->bi_blkg; in blkcg_bio_issue_check()
745 throtl = blk_throtl_bio(q, blkg, bio); in blkcg_bio_issue_check()
753 if (!bio_flagged(bio, BIO_QUEUE_ENTERED)) in blkcg_bio_issue_check()
754 blkg_rwstat_add(&blkg->stat_bytes, bio->bi_opf, in blkcg_bio_issue_check()
755 bio->bi_iter.bi_size); in blkcg_bio_issue_check()
756 blkg_rwstat_add(&blkg->stat_ios, bio->bi_opf, 1); in blkcg_bio_issue_check()
759 blkcg_bio_issue_init(bio); in blkcg_bio_issue_check()
857 static inline struct blkcg *__bio_blkcg(struct bio *bio) { return NULL; } in __bio_blkcg() argument
858 static inline struct blkcg *bio_blkcg(struct bio *bio) { return NULL; } in bio_blkcg() argument
867 static inline bool blkcg_punt_bio_submit(struct bio *bio) { return false; } in blkcg_punt_bio_submit() argument
868 static inline void blkcg_bio_issue_init(struct bio *bio) { } in blkcg_bio_issue_init() argument
870 struct bio *bio) { return true; } in blkcg_bio_issue_check() argument