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 <ronniesahlberg@gmail.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.
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)
Add a mechanism where residual overflow/underflow can be reportad back to
the application
We probably need somethinf for bidir residuals at some stage too
We dotn need two interfaces that only diuffer in whether they return a pointer or NULL vs an semiidentical interface that returns 0 or <0
All uses of _async() for scsi tasks should be replaced with the equivalent _task() function instead
These functions are also async functions for SCSI commands but they return
a task structure or NULL.
This task structure can be used in task management functions to abort the task or a whole task set.
The following used to fail:
./configure --prefix=/tmp/libiscsi
make install
This was because DESTDIR was unconditionally used in Makefile.in.
Instead, use the prefix from ./configure unless overriden by DESTDIR
and/or LIBDIR.
Note that this commit drops ldconfig from the Makefile but I'm not sure
this is wanted outside of packaging anyway.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>