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.
We dont need to unlink the in-buffers when cancelling a scsi task
since the whole task structure will go away shortly anyway and all
entries in the link will be automatically freed when the task is freed.
the write command is limited in the sense that file offset and
count bytes must be multiple of the targets blocksize. for most
copy/dd etc. operations this is sufficient to work.
Change the list-head structure for in-task scsi memory allocations to
be private to scsi-lowlevel since is is never accessed from anyehwere else and
it is private to this function.
Remove the pointer to the user data in the list head and replace it with a zero length buffer at the end of the header.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
- Lots of additional tests.
- ld_iscsi updates and bugfixes.
- Fix a protocol bug where we might send > FirstBurstLength amount of data
as unsolicited data.
- Tcp keepalive improvements.
- Debugging framework.
- Add support for redirection.
- Fix reconnect bug where we would incorrectly re-queue DATA-OUT PDUs after
reconnect.
- Add a new iscsi-readcapacity16 command.
- Squelch a huge number of compiler warnings.
qemu-kvm calls iscsi_parse_url_full() with iscsi = NULL.
In case there is an invalid URL specified qemu-kvm segfaults when
it tries to set iscsi->error_string.
I tried to patch this in qemu-kvm, but the initiator_name is dirived
from the target name so this seemed to be the easier approach.
old_first_burst_len is set but never used - remove it. Also replace an
if (!ptr)
free(ptr)
with
free(ptr)
as the check is redundant.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
* mark unused parameter as such
* wrap parens around a bitop
* remove unused labels
* fix error messages
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
gcc-4.6.3 warned about this one on several occasions:
gcc -DHAVE_CONFIG_H -I. -I. -I./include "-D_U_=__attribute__((unused))" -I./test-tool -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -ggdb3 -O0 -MT test-tool/bin_iscsi_test-0000_testunitready_simple.o -MD -MP -MF test-tool/.deps/bin_iscsi_test-0000_testunitready_simple.Tpo -c -o test-tool/bin_iscsi_test-0000_testunitready_simple.o `test -f 'test-tool/0000_testunitready_simple.c' || echo './'`test-tool/0000_testunitready_simple.c
test-tool/0000_testunitready_simple.c: In function 'T0000_testunitready_simple':
test-tool/0000_testunitready_simple.c:23:44: warning: declaration of 'initiator' shadows a global declaration [-Wshadow]
test-tool/iscsi-test.h:20:20: warning: shadowed declaration is here [-Wshadow]
For now the global initiator is renamed to initiatorname1 (and initiator2 is
renamed to initiatorname2, respectively), but ultimately the globals should
probably go away.
While fixing this it also became apparent that initiator-name-2 was parsed
into the "initiator" variable as well.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
Quoth gcc-4.6.3:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include "-D_U_=__attribute__((unused))" -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -g -O2 -MT lib/socket.lo -MD -MP -MF lib/.deps/socket.Tpo -c lib/socket.c -fPIC -DPIC -o lib/.libs/socket.o
lib/socket.c:445:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
Fix this and make it a static function.
Also remove trailing whitespace from this file while at it.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>