[PATCH 3/3] block: rename BIO_QUEUE_ENTERED as BIO_SPLITTED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cd4a4ae4683d ("block: don't use blocking queue entered for recursive
bio submits") introduces BIO_QUEUE_ENTERED to avoid blocking queue entered
for recursive bio submits. Now there isn't such use any more. The only
one use is for cgroup accounting on splitted bio, so rename it
as BIO_SPLITTED.

Cc: Josef Bacik <josef@xxxxxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Bart Van Assche <bvanassche@xxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
---
 block/blk-merge.c          | 10 +---------
 include/linux/blk-cgroup.h |  4 ++--
 include/linux/blk_types.h  |  2 +-
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 21e87a714a73..5fd81cd86928 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -332,15 +332,7 @@ void blk_queue_split(struct request_queue *q, struct bio **bio)
 		/* there isn't chance to merge the splitted bio */
 		split->bi_opf |= REQ_NOMERGE;
 
-		/*
-		 * Since we're recursing into make_request here, ensure
-		 * that we mark this bio as already having entered the queue.
-		 * If not, and the queue is going away, we can get stuck
-		 * forever on waiting for the queue reference to drop. But
-		 * that will never happen, as we're already holding a
-		 * reference to it.
-		 */
-		bio_set_flag(*bio, BIO_QUEUE_ENTERED);
+		bio_set_flag(*bio, BIO_SPLITTED);
 
 		bio_chain(split, *bio);
 		trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 76c61318fda5..a24c9a04f79f 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -792,11 +792,11 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q,
 
 	if (!throtl) {
 		/*
-		 * If the bio is flagged with BIO_QUEUE_ENTERED it means this
+		 * If the bio is flagged with BIO_SPLITTED 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_SPLITTED))
 			blkg_rwstat_add(&blkg->stat_bytes, bio->bi_opf,
 					bio->bi_iter.bi_size);
 		blkg_rwstat_add(&blkg->stat_ios, bio->bi_opf, 1);
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index be418275763c..d7235009f3a7 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -229,7 +229,7 @@ enum {
 				 * throttling rules. Don't do it again. */
 	BIO_TRACE_COMPLETION,	/* bio_endio() should trace the final completion
 				 * of this bio. */
-	BIO_QUEUE_ENTERED,	/* can use blk_queue_enter_live() */
+	BIO_SPLITTED,		/* splitted bio */
 	BIO_TRACKED,		/* set if bio goes through the rq_qos path */
 	BIO_FLAG_LAST
 };
-- 
2.20.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux