Since writing headers and payload in a single iov has never been
implementend and after thinking about it several times seems to
be very hairy I would like to revert this change since
the original implementation is in O(1) while the changed one
is in O(n). This results in a complexity of O(n^2) instead of
O(n) for the whole send operation.
This reverts commit 06eab264f6.
Dell Equallogic sans report an invalid LBA offset in the descriptor when
using 4k LUNs. Check the descriptor for consistency with the request.
Signed-off-by: Peter Lieven <pl@kamp.de>
The outqueue_current PDU might also be in waitpdu if it does not have
ISCSI_PDU_DELETE_WHEN_SENT. outqueue_current is freed after the
waitpdu list (for reconnect or defer_reconnect), or sometimes not
considered at all (for cancel), and this can cause a dangling pointer.
Keep outqueue_current up to date when a PDU is freed. A bit hacky,
but it avoids touching code all over the place.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
if the rejected packet is a NOP-Out it is legal
that it has no callback. In this case we end
up in a segfault.
Signed-off-by: Peter Lieven <pl@kamp.de>
after a target has send the async target requests logout event it may
reject each request with a waiting for logout reason. Catch these
rejects if an outstanding request and the logout event overlap.
Signed-off-by: Peter Lieven <pl@kamp.de>
this adds progress output, 16 byte CDB support, additional checks and user
settable max_in_flight and blocks_per_io.
Signed-off-by: Peter Lieven <pl@kamp.de>
1.10 and 1.11 both introduced incompatible changes to the
libiscsi ABI. Please do not do that, and feel free to Cc
me on any patch that touches include/. In the meanwhile,
bump the soname of the library. I suggest releasing 1.11.1
with this change for distros.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
- writesame10_unmap_until_end, writesame16_unmap, writesame16_unmap_until_end were doing an CU_ASSERT *PER-BYTE* in the verification phase,
which was very CPU-intensive. This change uses memcmp on a whole block which finishes much quicker.
This patch uses appropriate format string specifiers for uint64_t
types taken from inttypes.h, instead of using %lu, because %lu is
wrong at least on 32bit architecture.
Also, cast size_t expressions to unsigned long, again, because on at least
32bit architectures, size_t is int, not long.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cast ptrdiff (diff between two pointers) to long to fix printfs.
This fixes FTBFS on 32bit architectures.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Rename the macros for managing the linked lists from SLIST_* to ISCSI_LIST_*
to avoid a clash on *BSD which already have other macros SLIST_*
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This version contains changes for:
- Fix memory leaks in persistent reserve out.
- Fix various leaks in the testsuite.
- Add additional READ16 tests
- Better logging when reconnect fails.
- Discovery and Login fixes.
- Various fixes found by coverity.
- WRITESAME test updates.
- Add XML oputput support for the testsuite.
and various other things.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
The outqueue_current PDU might also be in waitpdu if it does not have
ISCSI_PDU_DELETE_WHEN_SENT. outqueue_current is freed after the
waitpdu list (for reconnect or defer_reconnect), or sometimes not
considered at all (for cancel), and this can cause a dangling pointer.
Keep outqueue_current up to date when a PDU is freed. A bit hacky,
but it avoids touching code all over the place.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Allow specifying a --test <file> in which case the tests listed in the file
will be executed.
This makes it easier than having to specify a potentially huge number
of tests on the command line.