Commit Graph

18 Commits

Author SHA1 Message Date
Ronnie Sahlberg
9eb26a368d Fix compiler warnings related to 'const' 2012-11-11 10:03:45 -08:00
Ronnie Sahlberg
116af01156 TYPO: Change periperal_device_type to just device_type
but leave the old name as a define for backward compatibility
2012-09-03 09:45:59 -07:00
Chris Webb
e671ba4699 Update examples/iscsi-dd.c to new iscsi_read10_task() API
Signed-off-by: Chris Webb <chris@arachsys.com>
2012-06-24 18:32:52 +10:00
Ronnie Sahlberg
d5f646099d READ10/WRITE10: Change these functions to sue the same signatures as the other READ/WRITE
Harmonize the signatures for READ10/WRITE10 to match the ones for READ12/16 and WRITE12/16

This breaks the API/ABI so this forces the next version of the library to bump the major version to 2.0

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-05 19:20:02 +10:00
Ronnie Sahlberg
db8dadab21 win32 updat ethe example app iscsiclient to compile and link with the compatibility functions 2012-05-15 21:59:59 +10:00
Ronnie Sahlberg
c2da7c9680 Update the licence texts 2012-03-05 13:50:10 +11:00
Ronnie Sahlberg
c3d3123981 Windows: Add support to build as a DLL under windows 2011-08-31 13:12:30 +10:00
Ronnie Sahlberg
de97dbdde8 start implementing mode page unmarshalling 2011-04-23 14:02:59 +10:00
Ronnie Sahlberg
3a39201543 Add 'zero-copy' in libiscsi for reads.
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.
2011-04-20 05:46:17 +10:00
Ronnie Sahlberg
07ad0572f2 Add support for READ6 2011-04-16 08:06:16 +10:00
Ronnie Sahlberg
343d86dca7 get rid of the _async() scsi functions.
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
2011-03-27 18:17:12 +11:00
Ronnie Sahlberg
f4f6ef5033 change dont automatically free the scsi_task once the callback completes.
Freeing the scsi_task structure is the responsibility of the application
to either do so during the callback, or later.
2011-03-27 17:53:05 +11:00
Ronnie Sahlberg
8784a72f0e ISCSICLIENT update the example to use the _task() function for task management 2011-02-27 10:35:49 +11:00
Ronnie Sahlberg
fb34c5615a Update the example with a task management call to abort a task 2011-02-19 18:04:22 +11:00
Ronnie Sahlberg
ca1e152f2c New example file :
iscsi-dd can be used to copy the content of one iscsi lun onto a different
iscsi lun of the exact same sixe.

This example  illustrates how to "steal" a task structure from a callback
so we can use store it and have it remains valid after the read10 callback
has completed.
It also illustrates the async api of libiscsi for read10/write10.

Initially a number of read10 calls are made asynchronously until the
queue is full.
As each read10 completes and returns data, we issue a write10 to write
that data to the other lun.

As soon as a write10 completes, we "release" the initial read10 task corresponding to what we wrote and issue a new read10 to continue copying the next set of un-read data.

Using the async api, it should be easy to get very high performance and
throughput even from one single thread.
2011-01-23 18:35:58 +11:00
Ronnie Sahlberg
9ddce8dc24 Replace bzero() with memset() 2011-01-03 15:35:36 +11:00
Ronnie Sahlberg
74fadc9337 Add support for R2T PDUs.
Update the "send scsi command" fucntion to honour
"FirstBurstLength" so that we only send this many bytes as unsolicited data.

The wait for a train of R2T from the target to clock out additional
busrts of data until the full task data has been sent to the Target.

We should now honour, and handle the case of
ImmediateData=No
InitialR2T=No
correctly for targets that are limited on receiveing data too fast.
2011-01-02 19:27:32 +11:00
Ronnie Sahlberg
098bc5a9a7 Initial import of libiscsi 2010-12-05 08:24:57 +11:00