Lines Matching defs:bio
223 * bio_issue_as_root_blkg - see if this bio needs to be issued as root blkg
224 * @return: true if this bio needs to be submitted with the root blkg context.
226 * In order to avoid priority inversions we sometimes need to issue a bio as if
229 * the bio and attach the appropriate blkg to the bio. Then we call this helper
233 static inline bool bio_issue_as_root_blkg(struct bio *bio)
235 return (bio->bi_opf & (REQ_META | REQ_SWAP)) != 0;
378 static inline void blkcg_bio_issue_init(struct bio *bio)
380 bio_issue_init(&bio->bi_issue, bio_sectors(bio));
455 * @bio: bio to merge
457 * @bio and @rq should belong to the same cgroup and their issue_as_root should
461 static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio)
463 return rq->bio->bi_blkg == bio->bi_blkg &&
464 bio_issue_as_root_blkg(rq->bio) == bio_issue_as_root_blkg(bio);
467 void blk_cgroup_bio_start(struct bio *bio);
499 static inline void blkcg_bio_issue_init(struct bio *bio) { }
500 static inline void blk_cgroup_bio_start(struct bio *bio) { }
501 static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { return true; }