Files
linux/drivers/block
Ilya Dryomov be13cfbdf0 rbd: end I/O the entire obj_request on error
commit 082a75dad8 upstream.

When we end I/O struct request with error, we need to pass
obj_request->length as @nr_bytes so that the entire obj_request worth
of bytes is completed.  Otherwise block layer ends up confused and we
trip on

    rbd_assert(more ^ (which == img_request->obj_request_count));

in rbd_img_obj_callback() due to more being true no matter what.  We
already do it in most cases but we are missing some, in particular
those where we don't even get a chance to submit any obj_requests, due
to an early -ENOMEM for example.

A number of obj_request->xferred assignments seem to be redundant but
I haven't touched any of obj_request->xferred stuff to keep this small
and isolated.

Cc: Alex Elder <elder@linaro.org>
Reported-by: Shawn Edwards <lesser.evil@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-13 05:15:41 -07:00
..
2014-04-03 12:01:05 -07:00
2013-03-26 14:48:12 -06:00
2013-04-09 14:13:19 -04:00
2013-04-09 14:13:32 -04:00
2013-03-28 14:50:49 -04:00
2015-04-19 10:10:47 +02:00
2013-05-31 11:45:52 -04:00
2013-04-09 14:13:32 -04:00
2014-11-21 09:22:52 -08:00
2013-03-20 15:44:58 +10:30