]> git.karo-electronics.de Git - karo-tx-linux.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>
Fri, 7 Sep 2012 19:08:19 +0000 (12:08 -0700)
commit827e10f7debd745acd5d283970235e0f1f8a60e7
tree99d47d1e7a2d8fc0d57abee4f88821851f03a9e5
parente40bf3b1c4038e3b851dc017f9e0883a79a8eeb4
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