]> git.baikalelectronics.ru Git - kernel.git/commit
target: do not submit a zero-bio I/O request
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Sep 2012 15:30:41 +0000 (17:30 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 18 Sep 2012 00:13:38 +0000 (17:13 -0700)
commit1fdc158ba2013cfe8f973b2946e6dc8207d0692a
tree177deae38b8bf505a749247b04a90b6b0b0c8eca
parent2621da7560c3d8dd580149328475ec705469fe8a
target: do not submit a zero-bio I/O request

scsi_setup_fs_cmnd does not like to receive requests with no
bios attached to it.  Special-case zero-length reads and writes,
by not submitting any bio.

Testcase: sg_raw /dev/sdb 28 00 00 00 00 00 00 00 00 00
    should not fail
    panics with the rest of the series but not this patch
    behaves correctly without or with this series

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_iblock.c