Lines Matching defs:bio
121 struct bio *bio;
136 while ((bio = bio_list_pop(&bios)))
137 submit_bio(bio);
1583 bool __blkcg_punt_bio_submit(struct bio *bio)
1585 struct blkcg_gq *blkg = bio->bi_blkg;
1588 bio->bi_opf &= ~REQ_CGROUP_PUNT;
1595 bio_list_add(&blkg->async_bios, bio);
1822 * @bio: target bio
1829 static inline struct blkcg_gq *blkg_tryget_closest(struct bio *bio,
1835 blkg = blkg_lookup_create(css_to_blkcg(css), bio->bi_disk->queue);
1849 * bio_associate_blkg_from_css - associate a bio with a specified css
1850 * @bio: target bio
1853 * Associate @bio with the blkg found by combining the css's blkg and the
1854 * request_queue of the @bio. An association failure is handled by walking up
1859 * A reference will be taken on the blkg and will be released when @bio is
1862 void bio_associate_blkg_from_css(struct bio *bio,
1865 if (bio->bi_blkg)
1866 blkg_put(bio->bi_blkg);
1869 bio->bi_blkg = blkg_tryget_closest(bio, css);
1871 blkg_get(bio->bi_disk->queue->root_blkg);
1872 bio->bi_blkg = bio->bi_disk->queue->root_blkg;
1878 * bio_associate_blkg - associate a bio with a blkg
1879 * @bio: target bio
1881 * Associate @bio with the blkg found from the bio's css and request_queue.
1886 void bio_associate_blkg(struct bio *bio)
1892 if (bio->bi_blkg)
1893 css = &bio_blkcg(bio)->css;
1897 bio_associate_blkg_from_css(bio, css);
1904 * bio_clone_blkg_association - clone blkg association from src to dst bio
1905 * @dst: destination bio
1906 * @src: source bio
1908 void bio_clone_blkg_association(struct bio *dst, struct bio *src)
1915 static int blk_cgroup_io_type(struct bio *bio)
1917 if (op_is_discard(bio->bi_opf))
1919 if (op_is_write(bio->bi_opf))
1924 void blk_cgroup_bio_start(struct bio *bio)
1926 int rwd = blk_cgroup_io_type(bio), cpu;
1930 bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
1934 * If the bio is flagged with BIO_CGROUP_ACCT it means this is a split
1935 * bio and we would have already accounted for the size of the bio.
1937 if (!bio_flagged(bio, BIO_CGROUP_ACCT)) {
1938 bio_set_flag(bio, BIO_CGROUP_ACCT);
1939 bis->cur.bytes[rwd] += bio->bi_iter.bi_size;
1945 cgroup_rstat_updated(bio->bi_blkg->blkcg->css.cgroup, cpu);