From: FUJITA Tomonori Date: Tue, 9 Jun 2009 03:47:10 +0000 (+0200) Subject: block: needs to set the residual length of a bidi request X-Git-Tag: v2.6.31-rc1~389^2~16 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=dbb66c4be020b01dc2f3d7c609ddb0e09d2c0af7;p=~emulex%2Finfiniband.git 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 Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- diff --git a/block/blk-core.c b/block/blk-core.c index 7ae83a1e2ac..03c5a64b6cc 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);