public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: needs to set the residual length of a bidi request.
@ 2009-06-09  1:57 FUJITA Tomonori
  2009-06-09  2:59 ` Tejun Heo
  2009-06-09  3:45 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2009-06-09  1:57 UTC (permalink / raw)
  To: jens.axboe; +Cc: tj, giridhar.malavali, linux-scsi, linux-kernel

This is against for-2.6.31.

This should fix the following problem:

http://marc.info/?l=linux-scsi&m=124449210813269&w=2

=
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] block: needs to set the residual length of a bidi request

Tejun's "block: set rq->resid_len to blk_rq_bytes() on issue" patch
seems to be incomplete; It doesn't set rq->resid_len to blk_rq_bytes()
for a bidi request (req->next_rq). As a result, all bidi users are
broken.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 block/blk-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 7ae83a1..03c5a64 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1846,6 +1846,9 @@ void blk_start_request(struct request *req)
 	 * resid_len to full count and add the timeout handler.
 	 */
 	req->resid_len = blk_rq_bytes(req);
+	if (unlikely(blk_bidi_rq(req)))
+		req->next_rq->resid_len = blk_rq_bytes(req->next_rq);
+
 	blk_add_timer(req);
 }
 EXPORT_SYMBOL(blk_start_request);
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: needs to set the residual length of a bidi request.
  2009-06-09  1:57 [PATCH] block: needs to set the residual length of a bidi request FUJITA Tomonori
@ 2009-06-09  2:59 ` Tejun Heo
  2009-06-09  3:45 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2009-06-09  2:59 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: jens.axboe, giridhar.malavali, linux-scsi, linux-kernel

FUJITA Tomonori wrote:
> This is against for-2.6.31.
> 
> This should fix the following problem:
> 
> http://marc.info/?l=linux-scsi&m=124449210813269&w=2
> 
> =
> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Subject: [PATCH] block: needs to set the residual length of a bidi request
> 
> Tejun's "block: set rq->resid_len to blk_rq_bytes() on issue" patch
> seems to be incomplete; It doesn't set rq->resid_len to blk_rq_bytes()
> for a bidi request (req->next_rq). As a result, all bidi users are
> broken.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: needs to set the residual length of a bidi request.
  2009-06-09  1:57 [PATCH] block: needs to set the residual length of a bidi request FUJITA Tomonori
  2009-06-09  2:59 ` Tejun Heo
@ 2009-06-09  3:45 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2009-06-09  3:45 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: tj, giridhar.malavali, linux-scsi, linux-kernel

On Tue, Jun 09 2009, FUJITA Tomonori wrote:
> This is against for-2.6.31.
> 
> This should fix the following problem:
> 
> http://marc.info/?l=linux-scsi&m=124449210813269&w=2

Thanks, applied

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-09  3:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-09  1:57 [PATCH] block: needs to set the residual length of a bidi request FUJITA Tomonori
2009-06-09  2:59 ` Tejun Heo
2009-06-09  3:45 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox