for a read10 call, the application might have specified too few buffers for the full I/O. For example if the application tries to read just 512 bytes off a MMC device. In this case we wopuld run out of buffers and fail with a SEGV. Instead of failing like this, return NULL from the function to locate a suitable buffer and read the remaining data from the command into the callback buffer instead, just like when no read-buffer at all has been specified.
when the qemu cancels an i/o. Update the patch to use FUA on all writes when qemu is in writethrough mode. Update to apply and compile against current master for qemu
The function to specify the read buffers is called scsi_task_add_data_in_buffer, not scsi_task_add_data_buffer Signed-off-by: Ronnie Sahlberg <email@example.com>
It is not real zero-copy since the data is still copied in the kernel, but it avoids copying the data inside libiscsi as well as in the callback. For SCSI tasks that will return data from the target, the application can now specify application buffers for libiscsi to read the data directly into. This is done by calling scsi_task_add_data_in_buffer(task, ... These buffers need not be linear, you can specify different areas to read into by calling this function several times. See examples/iscsiclient.c for an example.
…S bit is set too.
…data specified in the CDB XFERLENGTH and the iSCSI EDTL
…g make clean twice
dont pick task up from the argument, since this callback can be invoked from places where we dont have/know the task strucutre and it is thus NULL. Instead pick it up from scsi_cbstruct. This prevents a SEGV when processing REJECT to SCSI commands. (the scsi command callback dereferences the task pointer)
If we are reading 0 blocks, the R flag should be clear
…ocket and make sure we dont try to read mor than that.