Skip to content

Commit

Permalink
block: needs to set the residual length of a bidi request
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
fujita authored and Jens Axboe committed Jun 9, 2009
1 parent 172124e commit dbb66c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dbb66c4

Please sign in to comment.