History

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.

Christoph Hellwig committed 6 years ago

Commit 0376e9e1 parent 760f83e3 files · +7 −15Browse files

Showing the changes to include/linux (2 of 3 files). Show all

Unified · Split

2 files
  1. include/linux/blk-cgroup.h +6 −4
  2. include/linux/blk_types.h +1 −1
include/linux/blk-cgroup.h+6−4
@@ -607,12 +607,14 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q, · 606 unmodified lines
607607 u64_stats_update_begin(&bis->sync);
608608
609609 /*
610− * If the bio is flagged with BIO_QUEUE_ENTERED it means this
611− * is a split bio and we would have already accounted for the
612− * size of the bio.
610+ * If the bio is flagged with BIO_CGROUP_ACCT it means this is a
611+ * split bio and we would have already accounted for the size of
612+ * the bio.
613613 */
614− if (!bio_flagged(bio, BIO_QUEUE_ENTERED))
614+ if (!bio_flagged(bio, BIO_CGROUP_ACCT)) {
615+ bio_set_flag(bio, BIO_CGROUP_ACCT);
615616 bis->cur.bytes[rwd] += bio->bi_iter.bi_size;
617+ }
616618 bis->cur.ios[rwd]++;
617619
618620 u64_stats_update_end(&bis->sync);
include/linux/blk_types.h+1−1
@@ -220,7 +220,7 @@ enum { · 219 unmodified lines
220220 * throttling rules. Don't do it again. */
221221 BIO_TRACE_COMPLETION, /* bio_endio() should trace the final completion
222222 * of this bio. */
223− BIO_QUEUE_ENTERED, /* can use blk_queue_enter_live() */
223+ BIO_CGROUP_ACCT, /* has been accounted to a cgroup */
224224 BIO_TRACKED, /* set if bio goes through the rq_qos path */
225225 BIO_FLAG_LAST
226226 };