Arne Redlich
44cb5d60c5
iscsi.h: include <sys/types.h> as iscsi_data gained a size_t member
...
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com >
2012-11-18 00:36:28 +01:00
Peter Lieven
8cb369b87f
Merge remote-tracking branch 'upstream-git/master'
...
Conflicts:
include/iscsi-private.h
include/iscsi.h
lib/connect.c
lib/init.c
lib/scsi-lowlevel.c
2012-11-12 16:02:57 +01:00
Peter Lieven
5e1d011270
SCSI-LOWLEVEL revert changes to scsi-lowlevel
...
The memory tracking code reports memory allocated by iscsi_allocate_pdu_with_itt_flags_size() as lost.
This memory is allocated by the iscsi part of libiscsi, but later freed by the lowlevel scsi part. We
will fix this later by introducing an iscsi_task object.
2012-11-12 15:43:29 +01:00
Ronnie Sahlberg
3b05e9996f
Move cancel_task and cancel_all_tasks from scsi-lowlevel.c to scsi-command.c
...
These two functions belong in the iscsi layer, not the scsi layer so move them
out from scsi-lowlevel.c so that we can start turning scsi-lowlevel.c to a pure
scsi layer and remove all dependencies to iscsi from it.
2012-11-11 09:44:11 -08:00
Ronnie Sahlberg
50e7c682bb
Add a logging subsystem and change all DPRINTF to ISCSI_LOG
...
Add a mechanism where we can set a logging subsystem that libiscsi can use.
Create an example 'log to stderr' that utilities can use for convenience.
2012-11-07 06:34:38 -08:00
Peter Lieven
a97b51bbe5
Revert "DEBUG add function to set debug fd"
...
We will have a completely different debugging framework soon.
This reverts commit ec46d6fa43 .
2012-11-07 06:45:54 +01:00
Peter Lieven
ec46d6fa43
DEBUG add function to set debug fd
...
DPRINTF was blindly sending all debug output to fd 2 (stderr).
The new function iscsi_set_debug_fd() will set the debug fd.
In general debugging is completely disabled by default.
2012-11-06 16:07:43 +01:00
Peter Lieven
6cad82532a
SOCKET add option to bind to connection to interface(s)
2012-11-06 14:53:55 +01:00
Peter Lieven
65cd38e8ff
PDU further optimize iscsi_add_data()
...
This patch further improves add data and esepcially preassigns
the right amount of memory where the amount is preknown
2012-11-05 15:13:50 +01:00
Peter Lieven
c4dc380262
PDU reduce number of mallocs/memcpys in iscsi_add_data()
...
This patch adds logarithmic malloc behaviour to iscsi_add_data().
Currently for each new call there is a new buffer allocated
and all old data is copied to the new buffer. Change this by
allocating at least PAGE_SIZE bytes and increase the allocation
by powers of 2 each time it does no longer fit.
2012-11-03 02:49:56 +01:00
Peter Lieven
d9fbe37f4b
HEADERS fix early commit of new header data
2012-11-03 02:28:23 +01:00
Peter Lieven
3268ae4c88
INIT fix iscsi_destroy_url
2012-11-03 02:26:30 +01:00
Peter Lieven
d327ab09c6
MEMORY add wrappers around all mallocs and frees and trace them
...
This patch adds a wrapper around all memory allocations and frees.
The idea is to get warned immediately if the application leaks memory.
Additionally the wrapper functions make it easy to add different
memory allocators or memory pools in the future.
2012-11-03 01:05:57 +01:00
Peter Lieven
820410526e
INIT fix missing export of iscsi_set_tcp_syncnt()
2012-10-30 12:05:25 +01:00
Peter Lieven
774ede1f46
ISCSI_URL change strings from dynamic to static
2012-10-30 11:41:51 +01:00
Peter Lieven
923b9a4fb2
ISCSI-CONTEXT change dynamic string allocations to statics
2012-10-27 17:23:40 +02:00
Peter Lieven
4e7bd8767b
DPRINTF explain debug levels
2012-10-26 08:43:47 +02:00
Jon Grimm
b81bdd3932
Merge with upstream
2012-10-25 12:56:26 -05:00
Jon Grimm
1eaca70a52
Add MaintenanceIn: Report Supported Opcodes (all) and testcase.
2012-10-25 12:48:37 -05:00
Peter Lieven
fec061ac68
Add iscsi-readcapacity16 binary
...
This patch adds a small binary to read the size of an iscsi target. The value
is returned on stdout.
2012-10-23 15:59:28 +02:00
Peter Lieven
c2836e2a9a
DPRINTF add iscsi target_name if available
...
This patch adds the iscsi target name to the debug output
2012-10-23 10:53:14 +02:00
Peter Lieven
ad9cd56b2d
Add setters for TCP keepalive values
...
This patch adds 3 functions to set the 3 keepalive values TCP_KEEPIDLE, TCP_KEEPCNT
and TCP_KEEPINTVL. The values have to be set after iscsi context creation and are
then configured on the socket on each new connection.
2012-10-19 23:40:12 +02:00
Peter Lieven
f973608578
Add iscsi_tcp_set_user_timeout function
...
This patch adds a user configurable option to set the TCP_USER_TIMEOUT
socket option. With this timeout set a broken TCP session is shutdown
after a given timeout even there are unacked packets. SO_KEEPALIVE
seems not to work in this case.
2012-10-18 11:55:15 +02:00
Peter Lieven
cb6f2ce252
iSCSI Redirect support
...
This patch adds support for persistant portals like they are common
to storage arrays with different interfaces or physical members.
2012-10-18 10:48:52 +02:00
Peter Lieven
4cb845477d
Add debugging framework
...
This patch adds a user configurable debug level. For testing
it includes connection info and reporting errors.
2012-10-18 10:36:26 +02:00
Ronnie Sahlberg
b673d8ed57
CONNECT: export the iscsi_reconnect() function.
...
There are situations where you may want to trigger an iscsi reconnect
explicitely from an application so make this function exposed to applications.
2012-10-16 21:30:39 -07:00
Jon Grimm
c7d8d2593c
Add RESERVE6/RELEASE6 Support.
2012-09-27 12:45:06 -05:00
Jon Grimm
e55ec72f36
Add Read TOC (0x43) Command Support (and basic testcase).
2012-09-24 10:15:00 -05:00
Ronnie Sahlberg
16da01ed4e
Add PREVENTALLOWMEDIUMREMOVAL support
2012-07-17 18:12:03 +10:00
Ronnie Sahlberg
025136e81c
Add support for STARTSTOPUNIT command
2012-07-15 08:10:39 +10:00
Ronnie Sahlberg
1ce5d97e57
TEST: Add test for ORWRITE command
2012-07-14 17:29:58 +10:00
Ronnie Sahlberg
11f7da678b
Add support for ORWRITE
2012-07-14 17:01:38 +10:00
Ronnie Sahlberg
bdd6e6bb11
Add support for COMPARE_AND_WRITE command
2012-07-14 11:34:40 +10:00
Ronnie Sahlberg
29f5e9378f
Add support for WRITEVERIFY10/12/16
2012-07-14 08:19:43 +10:00
Ronnie Sahlberg
1745f76bef
Add SYNCHRONIZECACHE16 support
2012-07-13 10:19:44 +10:00
Ronnie Sahlberg
3221e631c0
MODE_SENSE Add sync version of mode sense 6
2012-07-13 09:33:41 +10:00
Arne Redlich
6edf993507
Make headers in include/ digestible for C++
...
Also removes trailing whitespace in these files.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com >
2012-07-08 13:38:41 +02: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
9130d2eb45
Add support for VERIFY12 and tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-06-04 20:35:15 +10:00
Ronnie Sahlberg
6003000809
Add VERIFY16 support and tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-06-04 20:16:44 +10:00
Ronnie Sahlberg
812df62bfd
SBC: Add GET_LBA_STATUS support and simple test
2012-05-30 18:41:12 +10:00
Ronnie Sahlberg
ed4b8ec72e
W32: Remove our poor emulation of poll() from the w32 build.
2012-05-13 16:46:38 +10:00
Michael Tokarev
aee0e3bf72
always export iscsi_set_tcp_keepalive()
...
Set only the (socket) options which are defined on a given platform.
The function becomes a no-op if no option is known at complie time.
Remove autoconf test for HAVE_TCP_KEEPALIVE too.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru >
2012-05-12 08:41:34 +10:00
Ronnie Sahlberg
733b97f4b8
Add PREFETCH10/16 implementations
2012-05-03 06:21:49 +10:00
Ronnie Sahlberg
2e3126b9ac
TESTS: add tests for READ12/16 RDPROTECT for luns without protection information
2012-05-02 20:14:51 +10:00
Ronnie Sahlberg
974738968d
Implement READ/WRITE_12/16 and a simple test for read16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-05-01 21:54:32 +10:00
Ronnie Sahlberg
568e4ddfcc
SBC: Add support for WRITESAME16 and add simple tests using it to unmap blocks from a thin provisioned lun
2012-04-28 14:34:47 +10:00
Ronnie Sahlberg
cc0fa15e14
SBC: Add support for WRITESAME10 and a simple test for using writesame10 to unmap blocks from thin provisioned luns
2012-04-28 13:55:37 +10:00
Ronnie Sahlberg
dd5f94b2ca
Add support for UNMAP command and add a simple test for this opcode
2012-04-22 08:09:15 +10:00
Ronnie Sahlberg
86bf89aabf
Add support for READCAPACITY16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-04-20 17:56:39 +10:00