Files
linux/drivers/block
Josh Durgin be4c4b8500 rbd: fix I/O error propagation for reads
commit 17c1cc1d92 upstream.

When a request returns an error, the driver needs to report the entire
extent of the request as completed.  Writes already did this, since
they always set xferred = length, but reads were skipping that step if
an error other than -ENOENT occurred.  Instead, rbd would end up
passing 0 xferred to blk_end_request(), which would always report
needing more data.  This resulted in an assert failing when more data
was required by the block layer, but all the object requests were
done:

[ 1868.719077] rbd: obj_request read result -108 xferred 0
[ 1868.719077]
[ 1868.719518] end_request: I/O error, dev rbd1, sector 0
[ 1868.719739]
[ 1868.719739] Assertion failure in rbd_img_obj_callback() at line 1736:
[ 1868.719739]
[ 1868.719739]   rbd_assert(more ^ (which == img_request->obj_request_count));

Without this assert, reads that hit errors would hang forever, since
the block layer considered them incomplete.

Fixes: http://tracker.ceph.com/issues/5647
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alex Elder <alex.elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 17:18:29 -07:00
..
2013-03-26 14:48:12 -06:00
2013-04-09 14:13:19 -04:00
2013-06-12 16:29:45 -07:00
2013-04-09 14:13:32 -04:00
2013-03-28 14:50:49 -04:00
2013-07-21 18:21:29 -07:00
2013-05-31 11:45:52 -04:00
2013-04-09 14:13:32 -04:00
2013-09-26 17:18:29 -07:00
2013-03-20 15:44:58 +10:30