Commit Graph

9 Commits

Author SHA1 Message Date
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