Skip to contentSkip to conversation

block: remove an incorrect check from blk_rq_append_bio

PATCH Applied Christoph Hellwig 4 participants 4 messages Apr 9, 2021 – Apr 12, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: remove an incorrect check from blk_rq_append_bio

blk_rq_append_bio is also used for the copy case, not just the map case, so tis debug check is not correct.

Fixes 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")
---
 block/blk-map.c | 3 ---
 1 file changed, 3 deletions(-)
block/blk-map.c +0 -3
index dac78376acc899..3743158ddaeb76 100644
@@ -485,9 +485,6 @@ int blk_rq_append_bio(struct request *rq, struct bio *bio)
 	struct bio_vec bv;
 	unsigned int nr_segs = 0;
 
-	if (WARN_ON_ONCE(rq->q->limits.bounce != BLK_BOUNCE_NONE))
-		return -EINVAL;
-
 	bio_for_each_bvec(bv, bio, iter)
 		nr_segs++;
 
Signature · 1 line
2.30.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Christoph Hellwig

blk_rq_append_bio is also used for the copy case, not just the map case, so tis debug check is not correct.

Small nit.. “this” spelled incorrectly above

Quoted 25 lines
Fixes 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")

---
block/blk-map.c | 3 ---

1 file changed, 3 deletions(-)
block/blk-map.c +0 -3
index dac78376acc899..3743158ddaeb76 100644
@@ -485,9 +485,6 @@ int blk_rq_append_bio(struct request *rq, struct bio *bio)
 	struct bio_vec bv;
 	unsigned int nr_segs = 0;
 
-	if (WARN_ON_ONCE(rq->q->limits.bounce != BLK_BOUNCE_NONE))
-		return -EINVAL;
-
 	bio_for_each_bvec(bv, bio, iter)
 		nr_segs++;
 
Signature · 1 line
2.30.1

Looks good otherwise.

--
Himanshu Madhani Oracle Linux Engineering

Reviewed-by on v1 1/1
#2 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

blk_rq_append_bio is also used for the copy case, not just the map case, so tis debug check is not correct.

Fixes 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")

With 's/tis/this/' can be done at the time of applying patch.

The commit 393bb12e0058 does add check in question here.

Looks good.

maintainer Applied
#3 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

blk_rq_append_bio is also used for the copy case, not just the map case, so tis debug check is not correct.

Applied, thanks.

Signature · 1 line
Jens Axboe