aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-08-05 17:35:16 -0400
committerJens Axboe <axboe@fb.com>2016-08-07 16:41:02 -0400
commit1eff9d322a444245c67515edb52bc0eb68374aa8 (patch)
treeaed4c3bfdf94202b93b9b5ce74c6e247f4c3ab85 /block/blk-throttle.c
parent31c64f78767948986c6c4c6f488803722c6b0e7a (diff)
block: rename bio bi_rw to bi_opf
Since commit 63a4cc24867d, bio->bi_rw contains flags in the lower portion and the op code in the higher portions. This means that old code that relies on manually setting bi_rw is most likely going to be broken. Instead of letting that brokeness linger, rename the member, to force old and out-of-tree code to break at compile time instead of at runtime. No intended functional changes in this commit. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index c5494e403239..f1aba26f4719 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -821,8 +821,8 @@ static void throtl_charge_bio(struct throtl_grp *tg, struct bio *bio)
821 * second time when it eventually gets issued. Set it when a bio 821 * second time when it eventually gets issued. Set it when a bio
822 * is being charged to a tg. 822 * is being charged to a tg.
823 */ 823 */
824 if (!(bio->bi_rw & REQ_THROTTLED)) 824 if (!(bio->bi_opf & REQ_THROTTLED))
825 bio->bi_rw |= REQ_THROTTLED; 825 bio->bi_opf |= REQ_THROTTLED;
826} 826}
827 827
828/** 828/**
@@ -1399,7 +1399,7 @@ bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
1399 WARN_ON_ONCE(!rcu_read_lock_held()); 1399 WARN_ON_ONCE(!rcu_read_lock_held());
1400 1400
1401 /* see throtl_charge_bio() */ 1401 /* see throtl_charge_bio() */
1402 if ((bio->bi_rw & REQ_THROTTLED) || !tg->has_rules[rw]) 1402 if ((bio->bi_opf & REQ_THROTTLED) || !tg->has_rules[rw])
1403 goto out; 1403 goto out;
1404 1404
1405 spin_lock_irq(q->queue_lock); 1405 spin_lock_irq(q->queue_lock);
@@ -1478,7 +1478,7 @@ out:
1478 * being issued. 1478 * being issued.
1479 */ 1479 */
1480 if (!throttled) 1480 if (!throttled)
1481 bio->bi_rw &= ~REQ_THROTTLED; 1481 bio->bi_opf &= ~REQ_THROTTLED;
1482 return throttled; 1482 return throttled;
1483} 1483}
1484 1484