Ilya Dryomov 082a75dad8 rbd: end I/O the entire obj_request on error
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>
Cc: stable@vger.kernel.org # 3.10+
Reported-by: Shawn Edwards <lesser.evil@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-05-01 16:44:30 -07:00
..
2015-04-15 16:35:22 -07:00
2015-02-16 17:56:04 -08:00
2013-04-09 14:13:19 -04:00
2014-08-08 15:57:28 -07:00
2011-08-08 11:40:15 +02:00
2014-08-08 15:57:28 -07:00
2015-04-15 15:06:33 -04:00
2015-01-02 15:20:25 -07:00
2015-04-02 12:39:28 -06:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00