diff options
author | 2020-04-28 13:27:55 +0200 | |
---|---|---|
committer | 2020-04-29 09:33:26 -0600 | |
commit | 0376e9efe18388bd486a65edbc16d34b84bddc8f (patch) | |
tree | 6382ef0862fc9c4433dfaa2ed64e2e663b00b7b9 /include/linux/blk-cgroup.h | |
parent | block: cleanup the memory stall accounting in submit_bio (diff) | |
download | linux-0376e9efe18388bd486a65edbc16d34b84bddc8f.tar.gz linux-0376e9efe18388bd486a65edbc16d34b84bddc8f.tar.bz2 linux-0376e9efe18388bd486a65edbc16d34b84bddc8f.zip |
block: replace BIO_QUEUE_ENTERED with BIO_CGROUP_ACCT
BIO_QUEUE_ENTERED is only used for cgroup accounting now, so rename
the flag and move setting it into the cgroup code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-cgroup.h')
-rw-r--r-- | include/linux/blk-cgroup.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 35f8ffe92b70..4deb8bb7b6af 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -607,12 +607,14 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q, u64_stats_update_begin(&bis->sync); /* - * If the bio is flagged with BIO_QUEUE_ENTERED it means this - * is a split bio and we would have already accounted for the - * size of the bio. + * If the bio is flagged with BIO_CGROUP_ACCT it means this is a + * split bio and we would have already accounted for the size of + * the bio. */ - if (!bio_flagged(bio, BIO_QUEUE_ENTERED)) + if (!bio_flagged(bio, BIO_CGROUP_ACCT)) { + bio_set_flag(bio, BIO_CGROUP_ACCT); bis->cur.bytes[rwd] += bio->bi_iter.bi_size; + } bis->cur.ios[rwd]++; u64_stats_update_end(&bis->sync); |