Commit Graph

138 Commits

Author SHA1 Message Date
Ronnie Sahlberg
b6782dd7c8 TCP KEEPALIVE support
Add tcp keeplaive support on platforms that support these socket options.
Set default to fail the socket after 120 seconds
2011-04-13 21:37:28 +10:00
Ronnie Sahlberg
120f41f225 TODO: Update TODO to reflect we now do target driven NOPs 2011-04-10 15:37:19 +10:00
Ronnie Sahlberg
ef846b0f30 Target initiated NOP:
Initial support to try to respond to target initiated NOPs.
2011-04-10 15:33:42 +10:00
Ronnie Sahlberg
cfe19486ee Add RESERVATION CONFLICT
From Richard Sharpe,  add support to handle when a target responds with
RESERVATION CONFLICT to a scsi i/o
2011-04-09 12:00:10 +10:00
Ronnie Sahlberg
bceb3d058d TYPO: fix error strings to "trying TO send ..." 2011-04-06 17:47:55 +10:00
Ronnie Sahlberg
e93ad2f039 Fix a cut-n-paste typo in an error message 2011-04-05 12:24:59 +10:00
Ronnie Sahlberg
1a5f267b1d WRITE10: Set W bit to 1 only if we write data, i.e. number of blocks are >0 2011-04-04 18:47:32 +10:00
Ronnie Sahlberg
e7300bfb8b READ10: only set R flag in iscsi if we are reading >0 blocks.
If we are reading 0 blocks, the R flag should be clear
2011-04-04 18:34:38 +10:00
Ronnie Sahlberg
5225b5fa66 Add definitions for ASCQ LBA-OUT-OF-RANGE 2011-04-04 17:40:13 +10:00
Ronnie Sahlberg
376f60fc06 Use ioctl(FIONREAD) to determine how many bytes are readable in the socket
and make sure we dont try to read mor than that.
2011-04-03 07:22:05 +10:00
Ronnie Sahlberg
4979b7346f From Richard Sharpe
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
2011-03-27 19:27:10 +11:00
Ronnie Sahlberg
2c932a1869 README: document we have support patches for kvm/qemu, sg3utils and mtx 2011-03-27 19:06:11 +11:00
Ronnie Sahlberg
e98030123d KVM/QEMU patch to make iscsi aware 2011-03-27 19:03:14 +11:00
Ronnie Sahlberg
53dda35d38 Add patch to provide iscsi functionality in the MTX package 2011-03-27 18:30:12 +11:00
Ronnie Sahlberg
40d3928c64 oops used the wrong sg3 patch
this adds the right sg3 patch to iscsi enable sg3 utils
2011-03-27 18:24:34 +11: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
cedcc55796 Add SG3 utils patch to the patches subdirectory 2011-03-27 18:00:55 +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
4e6e39ee23 Support for REJECT PDUs. 2011-02-27 13:49:49 +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
3561dbbd61 Document the async _task() functions 2011-02-27 10:32:23 +11:00
Ronnie Sahlberg
76208e1eff Rename the _send() functions to _task()
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.
2011-02-27 10:29:51 +11:00
Ronnie Sahlberg
bdbf6b5d00 Dont free the scsi task from iscsi_scsi_command_async(), leave that for the caller to do if required. 2011-02-25 15:53:56 +11:00
Ronnie Sahlberg
356a6571bb Login: remember what the TargetAddress returned during login is so we can
handle redirect 'errors'.
2011-02-25 15:35:49 +11:00
Ronnie Sahlberg
e9749ee68c Add ifdefs to protect the header files from being included
multiple times

From Richard Sharpe
2011-02-25 14:25:45 +11:00
Ronnie Sahlberg
b5c1c8705a Merge branch 'prefix_fix' of https://github.com/stefanha/libiscsi into stefanha-prefix_fix 2011-02-25 14:11:28 +11:00
Ronnie Sahlberg
d1fdaef5c6 Username/password separator: Allow ':' to separate the chap username/password in addition to '%' 2011-02-20 10:44:53 +11:00
Stefan Hajnoczi
7ed8707633 Let DESTDIR and LIBDIR override prefix and libdir
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>
2011-02-19 15:57:47 +00:00
Ronnie Sahlberg
b1955c69ff TODO: We now support task management functions 2011-02-19 18:24:21 +11:00
Ronnie Sahlberg
c07dee474c TaskManagement: Add LunReset, TargetWarmReset, TargetColdReset 2011-02-19 18:23:03 +11:00
Ronnie Sahlberg
6a2a8b5187 TaskManagement: Add a function for abort task set 2011-02-19 18:18:56 +11:00
Ronnie Sahlberg
b81d21ce8c TaskManagement: Add a function to abort a scsi_task 2011-02-19 18:04:55 +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
4315ee9225 Create _send() functions for all scsi commands that return a 'handle'
we can use to abort the task later.
2011-02-19 17:30:03 +11:00
Ronnie Sahlberg
09446737aa TaskMgmt: add a enum for the task management functions 2011-02-15 22:03:41 +11:00
Ronnie Sahlberg
9c7ca31482 TaskMgmt: Add handling of tm responses we receive from the target 2011-02-15 21:58:29 +11:00
Ronnie Sahlberg
3dfdebcba7 TaskMgmt : Add an initial function to create a iscsi tm PDU 2011-02-15 21:53:47 +11:00
Ronnie Sahlberg
332ea04e8d TaskMgmt: Add a functionto set the Reference cmdsn for tm pdus 2011-02-15 21:44:16 +11:00
Ronnie Sahlberg
95db35e592 TaskMgmt: add a function to set the ritt for tm pdus 2011-02-15 21:42:23 +11:00
Ronnie Sahlberg
2c093d86a6 whitespace changes to the list of pdu types 2011-02-15 21:26:26 +11:00
Ronnie Sahlberg
704288169f Add task management pdu request and response constants to the list of pdu types 2011-02-15 21:24:24 +11:00
Ronnie Sahlberg
f73e42ec26 TaskManagement: Store the ITT and CMDSN in the scsi_task structure
These are required for some of the task management functions
2011-02-15 20:57:03 +11:00
Ronnie Sahlberg
b51807e65a README update 2011-02-13 08:09:08 +11:00
Ronnie Sahlberg
e3af8903ac README remove strace from example 2011-02-13 08:06:30 +11:00
Ronnie Sahlberg
52b7ae3152 LD_PRELOAD: add dup2 support so we can use it with dd 2011-02-13 07:36:26 +11:00
Ronnie Sahlberg
0c6025b01b Using two different structures, with the same first element, and casting
between them makes compilers complain about aliasing.

Merge the two and use one single structure bot both iscsi and scsi sync
commands so that gcc stops crying about strict-aliasing
2011-02-09 15:51:45 +11:00
Ronnie Sahlberg
7a454aa010 autogen.sh: we should create libiscsi.pc not ctdb.pc 2011-02-07 21:47:26 +11:00
Ronnie Sahlberg
947a1a7796 MAKEFILE: Add a distclean target 2011-02-07 21:46:57 +11:00
Ronnie Sahlberg
35821830d6 LD_ISCSI.SO LD_PRELOAD hack
ld_iscsi.so is a small LD_PRELOAD hack that can be used to make normal
unix utilities such as 'stat' and 'cat' become iSCSI 'aware' and fake
handling an iSCSI URL as a normal read-only file.

See README for examples.
2011-02-05 21:21:52 +11:00
Ronnie Sahlberg
eba0a2de81 SYNC READ10 : add a sync version for read10 2011-02-05 20:41:02 +11:00