Commit dbb66c4be020b01dc2f3d7c609ddb0e09d2c0af7

Authored by FUJITA Tomonori
Committed by Jens Axboe
1 parent 172124e220

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>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -1846,6 +1846,9 @@
1846 1846 * resid_len to full count and add the timeout handler.
1847 1847 */
1848 1848 req->resid_len = blk_rq_bytes(req);
  1849 + if (unlikely(blk_bidi_rq(req)))
  1850 + req->next_rq->resid_len = blk_rq_bytes(req->next_rq);
  1851 +
1849 1852 blk_add_timer(req);
1850 1853 }
1851 1854 EXPORT_SYMBOL(blk_start_request);