diff --git a/0000-Fix-compiler-warning-error-under-gcc7.patch b/0000-Fix-compiler-warning-error-under-gcc7.patch deleted file mode 100644 index 99ba46e16a4beae8a01aa739cb640f66c327578b..0000000000000000000000000000000000000000 --- a/0000-Fix-compiler-warning-error-under-gcc7.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Ronnie Sahlberg -Date: Sat, 3 Jun 2017 11:20:20 -0700 -Subject: [PATCH] Fix compiler warning/error under gcc7 - -Gcc7 complains about falling through from the previous case to the default arm - -Signed-off-by: Ronnie Sahlberg -(cherry picked from commit 854e37aab7d7d2093a0a6620a3257b8f2a1d405c) ---- - test-tool/iscsi-support.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c -index 02367ca..ed00ce7 100644 ---- a/test-tool/iscsi-support.c -+++ b/test-tool/iscsi-support.c -@@ -2930,8 +2930,6 @@ void populate_ident_tgt_desc(unsigned char *buf, struct scsi_device *dev) - tgt_desig = desig; - prev_type = desig->designator_type; - } -- default: -- continue; - } - } - if (tgt_desig == NULL) { diff --git a/0001-Fix-another-compiler-warning.patch b/0001-Fix-another-compiler-warning.patch deleted file mode 100644 index e8aa62368d63337ffa88ff13219e9cc27f2ee07d..0000000000000000000000000000000000000000 --- a/0001-Fix-another-compiler-warning.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Ronnie Sahlberg -Date: Sat, 3 Jun 2017 11:33:51 -0700 -Subject: [PATCH] Fix another compiler warning - -We do need a default: arm here as the switch is not supposed to deal with -all possible values for the enum. - -Signed-off-by: Ronnie Sahlberg -(cherry picked from commit fb45f0343e3de45f2bc7516591d36c7466c2184e) ---- - test-tool/iscsi-support.c | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c -index ed00ce7..3f860ed 100644 ---- a/test-tool/iscsi-support.c -+++ b/test-tool/iscsi-support.c -@@ -2922,14 +2922,17 @@ void populate_ident_tgt_desc(unsigned char *buf, struct scsi_device *dev) - - for (desig = inq_di->designators; desig; desig = desig->next) { - switch (desig->designator_type) { -- case SCSI_DESIGNATOR_TYPE_VENDOR_SPECIFIC: -- case SCSI_DESIGNATOR_TYPE_T10_VENDORT_ID: -- case SCSI_DESIGNATOR_TYPE_EUI_64: -- case SCSI_DESIGNATOR_TYPE_NAA: -- if (prev_type <= desig->designator_type) { -- tgt_desig = desig; -- prev_type = desig->designator_type; -- } -+ case SCSI_DESIGNATOR_TYPE_VENDOR_SPECIFIC: -+ case SCSI_DESIGNATOR_TYPE_T10_VENDORT_ID: -+ case SCSI_DESIGNATOR_TYPE_EUI_64: -+ case SCSI_DESIGNATOR_TYPE_NAA: -+ if (prev_type <= desig->designator_type) { -+ tgt_desig = desig; -+ prev_type = desig->designator_type; -+ } -+ continue; -+ default: -+ continue; - } - } - if (tgt_desig == NULL) { diff --git a/0002-Fix-32bit-build.patch b/0002-Fix-32bit-build.patch deleted file mode 100644 index 7f6d4629501bf3dddc4c9d0fe0775bfa8e2ba60a..0000000000000000000000000000000000000000 --- a/0002-Fix-32bit-build.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Michal Suchanek -Date: Mon, 14 Nov 2016 17:28:31 +0100 -Subject: [PATCH] Fix 32bit build. - -Signed-off-by: Michal Suchanek -(cherry picked from commit a239423a0f9250dad9998152fa4b4b46accdf641) ---- - lib/iser.c | 7 ++++--- - test-tool/test_compareandwrite_invalid_dataout_size.c | 4 ++-- - test-tool/test_writesame10_invalid_dataout_size.c | 4 ++-- - test-tool/test_writesame16_invalid_dataout_size.c | 4 ++-- - 4 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/lib/iser.c b/lib/iser.c -index ad3adb3..17832c3 100644 ---- a/lib/iser.c -+++ b/lib/iser.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include "iscsi.h" - #include "iser-private.h" - #include "iscsi-private.h" -@@ -524,7 +525,7 @@ iser_prepare_read_cmd(struct iser_conn *iser_conn,struct iser_pdu *iser_pdu) - } - - tx_desc->data_dir = DATA_READ; -- hdr->read_va = htobe64((uint64_t)tx_desc->data_buff); -+ hdr->read_va = htobe64((intptr_t)tx_desc->data_buff); - hdr->read_stag = htobe32((uint32_t)tx_desc->data_mr->rkey); - hdr->flags |= ISER_RSV; - -@@ -565,7 +566,7 @@ iser_prepare_write_cmd(struct iser_conn *iser_conn, struct iser_pdu *iser_pdu) - - hdr->flags |= ISER_WSV; - hdr->write_stag = htobe32((uint32_t)(tx_desc->data_mr->rkey)); -- hdr->write_va = htobe64((uint64_t)(tx_desc->data_buff)); -+ hdr->write_va = htobe64((intptr_t)(tx_desc->data_buff)); - - return 0; - } -@@ -1146,7 +1147,7 @@ static int iser_handle_wc(struct ibv_wc *wc,struct iser_conn *iser_conn) - wc->wr_id, wc->status, wc->vendor_err); - return iscsi_service_reconnect_if_loggedin(iscsi); - } else { -- iscsi_set_error(iscsi, "flush error: wr id %lx\n", wc->wr_id); -+ iscsi_set_error(iscsi, "flush error: wr id %" PRIx64 "\n", wc->wr_id); - - return 0; - } -diff --git a/test-tool/test_compareandwrite_invalid_dataout_size.c b/test-tool/test_compareandwrite_invalid_dataout_size.c -index b27b4f8..76da1e0 100644 ---- a/test-tool/test_compareandwrite_invalid_dataout_size.c -+++ b/test-tool/test_compareandwrite_invalid_dataout_size.c -@@ -64,7 +64,7 @@ test_compareandwrite_invalid_dataout_size(void) - - - logging(LOG_VERBOSE, "Check too small DataOut"); -- logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%ld (4 blocks) " -+ logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%zd (4 blocks) " - "and TL == 1 ", 4 * block_size); - - new_tl = 1; -@@ -74,7 +74,7 @@ test_compareandwrite_invalid_dataout_size(void) - EXPECT_STATUS_GENERIC_BAD); - - logging(LOG_VERBOSE, "Check too large DataOut"); -- logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%ld (4 blocks) " -+ logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%zd (4 blocks) " - "and TL == 3 ", 4 * block_size); - - new_tl = 2; -diff --git a/test-tool/test_writesame10_invalid_dataout_size.c b/test-tool/test_writesame10_invalid_dataout_size.c -index f521908..119d786 100644 ---- a/test-tool/test_writesame10_invalid_dataout_size.c -+++ b/test-tool/test_writesame10_invalid_dataout_size.c -@@ -41,13 +41,13 @@ test_writesame10_invalid_dataout_size(void) - memset(scratch, 0xa6, block_size); - - logging(LOG_VERBOSE, "Check too small DataOut"); -- logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)", -+ logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)", - block_size / 2, block_size); - WRITESAME10(sd, 0, block_size / 2, 1, 0, 1, 0, 0, scratch, - EXPECT_STATUS_GENERIC_BAD); - - logging(LOG_VERBOSE, "Check too large DataOut"); -- logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)", -+ logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)", - block_size * 2, block_size); - WRITESAME10(sd, 0, block_size * 2, 1, 0, 1, 0, 0, scratch, - EXPECT_STATUS_GENERIC_BAD); -diff --git a/test-tool/test_writesame16_invalid_dataout_size.c b/test-tool/test_writesame16_invalid_dataout_size.c -index 128673f..a2e22bb 100644 ---- a/test-tool/test_writesame16_invalid_dataout_size.c -+++ b/test-tool/test_writesame16_invalid_dataout_size.c -@@ -41,13 +41,13 @@ test_writesame16_invalid_dataout_size(void) - memset(scratch, 0xa6, block_size); - - logging(LOG_VERBOSE, "Check too small DataOut"); -- logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)", -+ logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)", - block_size / 2, block_size); - WRITESAME16(sd, 0, block_size / 2, 1, 0, 1, 0, 0, scratch, - EXPECT_STATUS_GENERIC_BAD); - - logging(LOG_VERBOSE, "Check too large DataOut"); -- logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)", -+ logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)", - block_size * 2, block_size); - WRITESAME16(sd, 0, block_size * 2, 1, 0, 1, 0, 0, scratch, - EXPECT_STATUS_GENERIC_BAD); diff --git a/0003-iser-Use-local-container_of-definition.patch b/0003-iser-Use-local-container_of-definition.patch deleted file mode 100644 index cbf14ae4597074b383d55040d5c005072d36348f..0000000000000000000000000000000000000000 --- a/0003-iser-Use-local-container_of-definition.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Cole Robinson -Date: Mon, 30 Apr 2018 18:11:05 -0400 -Subject: [PATCH] iser: Use local container_of definition - -The code was implicitly dependent on container_of from -inifiniband/verbs.h, however that's been removed in rdma-core -latest release: - -https://github.com/linux-rdma/rdma-core/commit/ce0274acffc78ed2861a56bdc34cdd3d60c20e1f - -Define container_of locally if it's not already defined - -(cherry picked from commit f1feb218e2823d236569f0ca3cfad07334f2a304) ---- - lib/iser.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/lib/iser.c b/lib/iser.c -index 17832c3..aa7244c 100644 ---- a/lib/iser.c -+++ b/lib/iser.c -@@ -32,6 +32,20 @@ - #include - #include - -+ -+#ifndef container_of -+/** -+ * container_of - cast a member of a structure out to the containing structure -+ * @ptr: the pointer to the member. -+ * @type: the type of the container struct this is embedded in. -+ * @member: the name of the member within the struct. -+ * -+ */ -+#define container_of(ptr, type, member) \ -+ ((type *) ((uint8_t *)(ptr) - offsetof(type, member))) -+#endif -+ -+ - #ifdef __linux - - static int cq_handle(struct iser_conn *iser_conn); diff --git a/1.18.0.tar.gz b/1.18.0.tar.gz deleted file mode 100644 index 9d5ecb496df2c651f8007d9baa7dc921a34fbae8..0000000000000000000000000000000000000000 Binary files a/1.18.0.tar.gz and /dev/null differ diff --git a/1.19.0.tar.gz b/1.19.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d5f6238476068dd12044a94145e1979a1a2122ed Binary files /dev/null and b/1.19.0.tar.gz differ diff --git a/6000-iscsi-perf-fix-overflow-issue-in-fill_read_queue.patch b/6000-iscsi-perf-fix-overflow-issue-in-fill_read_queue.patch deleted file mode 100644 index 316c7588c34f7ad82b0d2f299cc27a8e3f8a3460..0000000000000000000000000000000000000000 --- a/6000-iscsi-perf-fix-overflow-issue-in-fill_read_queue.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 63cfcd3384f6ab35a7d1f3d82dd824fb1872d657 Mon Sep 17 00:00:00 2001 -From: optimistyzy -Date: Mon, 9 Jan 2017 18:34:12 +0800 -Subject: [PATCH 035/110] iscsi-perf: fix overflow issue in fill_read_queue - -If with int defintion, this statement: - -num_blocks = client->num_blocks - client->pos; - -May not get the exact value we want. - -Signed-off-by: optimistyzy ---- - utils/iscsi-perf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/utils/iscsi-perf.c b/utils/iscsi-perf.c -index 14c3f49..7e0f145 100644 ---- a/utils/iscsi-perf.c -+++ b/utils/iscsi-perf.c -@@ -186,7 +186,7 @@ out: - - void fill_read_queue(struct client *client) - { -- int num_blocks; -+ int64_t num_blocks; - - if (finished) return; - -@@ -210,7 +210,7 @@ void fill_read_queue(struct client *client) - - task = iscsi_read16_task(client->iscsi, - client->lun, client->pos, -- num_blocks * client->blocksize, -+ (uint32_t)(num_blocks * client->blocksize), - client->blocksize, 0, 0, 0, 0, 0, - cb, client); - if (task == NULL) { --- -1.8.3.1 - diff --git a/6001-sync-fix-return-value-for-various-sync-commands.patch b/6001-sync-fix-return-value-for-various-sync-commands.patch deleted file mode 100644 index d6b0ace09f73200b0c92d78ac797dc1f814b0764..0000000000000000000000000000000000000000 --- a/6001-sync-fix-return-value-for-various-sync-commands.patch +++ /dev/null @@ -1,78 +0,0 @@ -From b5210a1e31afb9f0adf369cde11c612f3365432e Mon Sep 17 00:00:00 2001 -From: Peter Lieven -Date: Mon, 23 Jan 2017 15:40:09 +0100 -Subject: [PATCH 036/110] sync: fix return value for various sync commands - -all sync commands that return an integer value are -supposed to return a negative value on error. -However, state.status is positive non-zero on error. -Fix this by returning -1 if the state.status is -not SCSI_STATUS_GOOD. - -Reported-by: Sitsofe Wheeler -Signed-off-by: Peter Lieven ---- - lib/sync.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/lib/sync.c b/lib/sync.c -index 3b907c0..0e4d42b 100644 ---- a/lib/sync.c -+++ b/lib/sync.c -@@ -111,7 +111,7 @@ iscsi_connect_sync(struct iscsi_context *iscsi, const char *portal) - /* clear connect_data so it doesnt point to our stack */ - iscsi->connect_data = NULL; - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - int -@@ -132,7 +132,7 @@ iscsi_full_connect_sync(struct iscsi_context *iscsi, - - event_loop(iscsi, &state); - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - int iscsi_login_sync(struct iscsi_context *iscsi) -@@ -149,7 +149,7 @@ int iscsi_login_sync(struct iscsi_context *iscsi) - - event_loop(iscsi, &state); - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - int iscsi_logout_sync(struct iscsi_context *iscsi) -@@ -166,7 +166,7 @@ int iscsi_logout_sync(struct iscsi_context *iscsi) - - event_loop(iscsi, &state); - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - static void -@@ -213,7 +213,7 @@ int iscsi_reconnect_sync(struct iscsi_context *iscsi) - - reconnect_event_loop(iscsi, &state); - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - static void -@@ -270,7 +270,7 @@ iscsi_task_mgmt_sync(struct iscsi_context *iscsi, - - event_loop(iscsi, &state); - -- return state.status; -+ return (state.status == SCSI_STATUS_GOOD) ? 0 : -1; - } - - int --- -1.8.3.1 - diff --git a/libiscsi.spec b/libiscsi.spec index d1751ec1fa4a6eb3b9a064e13be2d99861b078db..d1746554591d2b94b78a8d495a33c27d9641f6c5 100644 --- a/libiscsi.spec +++ b/libiscsi.spec @@ -1,19 +1,12 @@ Name: libiscsi -Version: 1.18.0 -Release: 6 +Version: 1.19.0 +Release: 1 Summary: Client-side library to implement the iSCSI protocol License: LGPLv2+ and GPLv2+ URL: https://github.com/sahlberg/%{name} Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz -Patch0000: 0000-Fix-compiler-warning-error-under-gcc7.patch -Patch0001: 0001-Fix-another-compiler-warning.patch -Patch0002: 0002-Fix-32bit-build.patch -Patch0003: 0003-iser-Use-local-container_of-definition.patch -Patch6000: 6000-iscsi-perf-fix-overflow-issue-in-fill_read_queue.patch -Patch6001: 6001-sync-fix-return-value-for-various-sync-commands.patch - BuildRequires: gcc git BuildRequires: autoconf automake libtool popt-devel CUnit-devel libgcrypt-devel rdma-core-devel chrpath @@ -102,5 +95,8 @@ This package contains the help info for %{name}. %{_mandir}/man1/iscsi-test-cu.1.gz %changelog +* Wed Jul 29 2020 yanglongkang - 1.19.0-1 +- update to 1.19.0 version + * Sat Aug 31 2019 mingfangsen - 1.18.0-6 - Package init