• Ilya Dryomov's avatar
    rbd: end I/O the entire obj_request on error · be13cfbd
    Ilya Dryomov authored
    commit 082a75dad84d79d1c15ea9e50f31cb4bb4fa7fd6 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: 's avatarShawn Edwards <lesser.evil@gmail.com>
    Reviewed-by: 's avatarSage Weil <sage@redhat.com>
    Signed-off-by: 's avatarIlya Dryomov <idryomov@gmail.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    be13cfbd
Name
Last commit
Last update
..
aoe Loading commit data...
drbd Loading commit data...
mtip32xx Loading commit data...
paride Loading commit data...
rsxx Loading commit data...
xen-blkback Loading commit data...
DAC960.c Loading commit data...
DAC960.h Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
amiflop.c Loading commit data...
ataflop.c Loading commit data...
brd.c Loading commit data...
cciss.c Loading commit data...
cciss.h Loading commit data...
cciss_cmd.h Loading commit data...
cciss_scsi.c Loading commit data...
cciss_scsi.h Loading commit data...
cpqarray.c Loading commit data...
cpqarray.h Loading commit data...
cryptoloop.c Loading commit data...
floppy.c Loading commit data...
hd.c Loading commit data...
ida_cmd.h Loading commit data...
ida_ioctl.h Loading commit data...
loop.c Loading commit data...
mg_disk.c Loading commit data...
nbd.c Loading commit data...
nvme-core.c Loading commit data...
nvme-scsi.c Loading commit data...
osdblk.c Loading commit data...
pktcdvd.c Loading commit data...
ps3disk.c Loading commit data...
ps3vram.c Loading commit data...
rbd.c Loading commit data...
rbd_types.h Loading commit data...
smart1,2.h Loading commit data...
sunvdc.c Loading commit data...
swim.c Loading commit data...
swim3.c Loading commit data...
swim_asm.S Loading commit data...
sx8.c Loading commit data...
umem.c Loading commit data...
umem.h Loading commit data...
virtio_blk.c Loading commit data...
xen-blkfront.c Loading commit data...
xsysace.c Loading commit data...
z2ram.c Loading commit data...