Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279652 > unrolled thread

[PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment

Started byMing Lei <ming.lei@canonical.com>
First post2015-11-30 09:10 +0100
Last post2015-11-30 21:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment Ming Lei <ming.lei@canonical.com> - 2015-11-30 09:10 +0100
    Re: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case  of single segment Jens Axboe <axboe@kernel.dk> - 2015-11-30 21:10 +0100
      Re: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case  of single segment Jens Axboe <axboe@kernel.dk> - 2015-11-30 21:10 +0100

#1279652 — [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment

FromMing Lei <ming.lei@canonical.com>
Date2015-11-30 09:10 +0100
Subject[PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment
Message-ID<qArH4-10J-1@gated-at.bofh.it>
When bio has only one physical segment, we should set bio's
bi_seg_front_size as the real(final) size of the single segment.

Fixes: 02e707424c2ea(blk-merge: fix blk_bio_segment_split)
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 block/blk-merge.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 41a55ba..e01405a 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -103,6 +103,9 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
 			bvprv = bv;
 			bvprvp = &bvprv;
 			sectors += bv.bv_len >> 9;
+
+			if (nsegs == 1 && seg_size > front_seg_size)
+				front_seg_size = seg_size;
 			continue;
 		}
 new_segment:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1280242 — Re: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment

FromJens Axboe <axboe@kernel.dk>
Date2015-11-30 21:10 +0100
SubjectRe: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment
Message-ID<qACVP-8dD-9@gated-at.bofh.it>
In reply to#1279652
On 11/30/2015 01:05 AM, Ming Lei wrote:
> When bio has only one physical segment, we should set bio's
> bi_seg_front_size as the real(final) size of the single segment.
>
> Fixes: 02e707424c2ea(blk-merge: fix blk_bio_segment_split)
> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>

I'm going to fold this into the offending patch. Thanks Ming!

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1280243 — Re: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment

FromJens Axboe <axboe@kernel.dk>
Date2015-11-30 21:10 +0100
SubjectRe: [PATCH] blk-merge: fix computing bio->bi_seg_front_size in case of single segment
Message-ID<qACVQ-8dD-13@gated-at.bofh.it>
In reply to#1280242
On 11/30/2015 01:01 PM, Jens Axboe wrote:
> On 11/30/2015 01:05 AM, Ming Lei wrote:
>> When bio has only one physical segment, we should set bio's
>> bi_seg_front_size as the real(final) size of the single segment.
>>
>> Fixes: 02e707424c2ea(blk-merge: fix blk_bio_segment_split)
>> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
>> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>
> I'm going to fold this into the offending patch. Thanks Ming!

Applied separately, I mixed up two different patches. Applied for 4.4.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web