linux/drivers/block
Ilya Dryomov 139d0593af 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:16:57 -07:00
..
aoe mm: close PageTail race 2014-03-04 07:55:47 -08:00
drbd drbd: merge_bvec_fn: properly remap bvm->bi_bdev 2015-01-29 17:40:50 -08:00
mtip32xx mtip32xx: Remove dfs_parent after pci unregister 2014-07-06 18:57:26 -07:00
paride drivers/block/paride/pg.c: underflow bug in pg_write() 2014-01-21 20:16:56 -08:00
rsxx block: Convert bio_for_each_segment() to bvec_iter 2013-11-23 22:33:49 -08:00
xen-blkback xen-blkback: fix leak on grant map error path 2014-11-14 08:59:51 -08:00
zram zram: avoid kunmap_atomic() of a NULL pointer 2014-11-21 09:23:00 -08:00
DAC960.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
DAC960.h Fix DAC960 driver on machines which don't support 64-bit DMA 2007-09-11 17:21:19 -07:00
Kconfig zram: promote zram from staging 2014-01-30 16:56:55 -08:00
Makefile zram: promote zram from staging 2014-01-30 16:56:55 -08:00
amiflop.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
ataflop.c block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
brd.c block: Convert bio_for_each_segment() to bvec_iter 2013-11-23 22:33:49 -08:00
cciss.c drivers/block/cciss.c:cciss_init_one(): use proper errnos 2014-01-21 20:16:56 -08:00
cciss.h cciss: Adds simple mode functionality 2011-08-08 11:40:15 +02:00
cciss_cmd.h cciss: use new doorbell-bit-5 reset method 2011-05-06 08:23:55 -06:00
cciss_scsi.c cciss: switch to ->show_info() 2013-04-09 14:13:19 -04:00
cciss_scsi.h cciss: add cciss_tape_cmds module paramter 2011-05-06 08:23:59 -06:00
cpqarray.c cpqarray: fix info leak in ida_locked_ioctl() 2013-09-24 17:00:26 -07:00
cpqarray.h
cryptoloop.c move linux/loop.h to drivers/block 2013-06-29 12:46:45 +04:00
floppy.c floppy: don't write kernel-only members to FDRAWCMD ioctl output 2014-05-13 13:32:47 +02:00
hd.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ida_cmd.h
ida_ioctl.h
loop.c drivers/block/loop.c: fix comment typo in loop_config_discard 2014-01-21 20:16:56 -08:00
loop.h move linux/loop.h to drivers/block 2013-06-29 12:46:45 +04:00
mg_disk.c mg_disk: Spelling s/finised/finished/ 2014-01-21 20:34:58 -08:00
nbd.c nbd: fix possible memory leak 2015-04-19 10:11:06 +02:00
null_blk.c null_blk: use blk_complete_request and blk_mq_complete_request 2014-02-10 09:27:31 -07:00
nvme-core.c Merge git://git.infradead.org/users/willy/linux-nvme 2014-02-05 15:53:26 -08:00
nvme-scsi.c NVMe: compat SG_IO ioctl 2013-12-16 15:49:40 -05:00
osdblk.c block: replace strict_strtoul() with kstrtoul() 2013-09-11 15:56:56 -07:00
pktcdvd.c pktcdvd: fix error return code 2014-01-03 10:05:34 +01:00
ps3disk.c block: Kill bio_segments()/bi_vcnt usage 2013-11-23 22:33:51 -08:00
ps3vram.c block: Convert bio_for_each_segment() to bvec_iter 2013-11-23 22:33:49 -08:00
rbd.c rbd: end I/O the entire obj_request on error 2015-05-13 05:16:57 -07:00
rbd_types.h rbd: get rid of RBD_MAX_SEG_NAME_LEN 2012-12-17 08:37:29 -06:00
skd_main.c drivers: block: Mark the functions as static in skd_main.c 2013-12-19 08:06:49 -07:00
skd_s1120.h skd: fix formatting in skd_s1120.h 2013-11-08 09:10:30 -07:00
smart1,2.h fix typos 'comamnd' -> 'command' in comments 2011-02-02 11:31:21 +01:00
sunvdc.c sunvdc: don't call VD_OP_GET_VTOC 2014-11-21 09:23:00 -08:00
swim.c drivers/block/swim.c: remove unnecessary platform_set_drvdata() 2013-09-11 15:56:59 -07:00
swim3.c block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
swim_asm.S m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
sx8.c drivers/block/sx8.c: remove unnecessary pci_set_drvdata() 2014-01-21 20:16:56 -08:00
umem.c block: Convert drivers to immutable biovecs 2013-11-23 22:33:51 -08:00
umem.h drivers/block/umem: trim trailing whitespace 2007-10-10 09:25:59 +02:00
virtio_blk.c virtio_blk: fix race between start and stop queue 2014-06-11 11:54:10 -07:00
xen-blkfront.c Merge branch 'stable/for-jens-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip into for-linus 2014-02-10 12:52:34 -07:00
xsysace.c xilinx systemace: Fix sparse warnings 2013-07-10 07:47:12 +02:00
z2ram.c block/z2ram: Remove duplicate external declarations 2013-11-26 11:09:10 +01:00