diff --git a/0030-Add-deploy-shell-script.patch b/0030-Add-deploy-shell-script.patch new file mode 100644 index 0000000000000000000000000000000000000000..5e46db019020cf5eb248a23edc78068edd33cbea --- /dev/null +++ b/0030-Add-deploy-shell-script.patch @@ -0,0 +1,32 @@ +From 43dfe3a169191879c86e5e91742a10922ea47436 Mon Sep 17 00:00:00 2001 +From: tongkunkun +Date: Fri, 25 Nov 2022 11:04:20 +0800 +Subject: [PATCH] Add deploy shell script + +add deploy.sh + +Signed-off-by: tongkunkun +--- + deploy.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + create mode 100644 deploy.sh + +diff --git a/deploy.sh b/deploy.sh +new file mode 100644 +index 0000000..99ec7fe +--- /dev/null ++++ b/deploy.sh +@@ -0,0 +1,10 @@ ++mkdir -p /data/spdk-tmp ++cp spdk-21.01.1 /data/spdk-tmp ++cd /data/spdk-tmp ++tar -xzvf v21.01.1.tar.gz ++cp *.patch spdk-21.01.1/ ++cd spdk-21.01.1 ++git init ++git add . ++git commit -s ++ +-- +2.37.2.windows.2 + diff --git a/0030-bdev-modify-the-malformed-space-in-code-format.patch b/0030-bdev-modify-the-malformed-space-in-code-format.patch new file mode 100644 index 0000000000000000000000000000000000000000..8277df591a49263915ef62b2da29817a116cce24 --- /dev/null +++ b/0030-bdev-modify-the-malformed-space-in-code-format.patch @@ -0,0 +1,30 @@ +From d024e1ca9209b6ff8642aa4519789008a4bdfabf Mon Sep 17 00:00:00 2001 +From: tongkunkun +Date: Thu, 24 Nov 2022 17:06:25 +0800 +Subject: [PATCH] bdev: modify the malformed space in code format + +replace the malformed space to tab + +Signed-off-by: tongkunkun +--- + lib/bdev/bdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c +index 2a642d6..511b499 100644 +--- a/lib/bdev/bdev.c ++++ b/lib/bdev/bdev.c +@@ -3578,8 +3578,8 @@ spdk_bdev_read(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, + + int + spdk_bdev_read_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, +- void *buf, uint64_t offset_blocks, uint64_t num_blocks, +- spdk_bdev_io_completion_cb cb, void *cb_arg) ++ void *buf, uint64_t offset_blocks, uint64_t num_blocks, ++ spdk_bdev_io_completion_cb cb, void *cb_arg) + { + return bdev_read_blocks_with_md(desc, ch, buf, NULL, offset_blocks, num_blocks, cb, cb_arg); + } +-- +2.37.2.windows.2 + diff --git a/0030-json-fix-wrong-param-in-json_parse_ut.c-calling-func.patch b/0030-json-fix-wrong-param-in-json_parse_ut.c-calling-func.patch new file mode 100644 index 0000000000000000000000000000000000000000..fdc78b692b8a09c97378be348440d0b4c682def0 --- /dev/null +++ b/0030-json-fix-wrong-param-in-json_parse_ut.c-calling-func.patch @@ -0,0 +1,56 @@ +From c8583472bd7b2821712a5474e082a3e32f33a93b Mon Sep 17 00:00:00 2001 +From: tongkunkun +Date: Wed, 3 Aug 2022 14:09:22 +0800 +Subject: [PATCH] json: fix wrong param in json_parse_ut.c calling function + 'spdk_json_parse' + +the sizeof(g_vals) should be the num of array, not the num of bytes. see follow: + +CU_ASSERT(spdk_json_parse(g_buf, sizeof(in) - 1, g_vals, sizeof(g_vals), &g_end, flags | SPDK_JSON_PARSE_FLAG_DECODE_IN_PLACE) == num_vals); + +Fixes #2623 + +Signed-off-by: tongkunkun +Change-Id: I3b7994606284fe3464650337ecb0f723a627f7aa +Reported-by: Jim Harris +Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13841 +Reviewed-by: GangCao +Reviewed-by: Changpeng Liu +Reviewed-by: Dong Yi +Reviewed-by: Konrad Sztyber +Reviewed-by: Ben Walker +Community-CI: Mellanox Build Bot +Tested-by: SPDK CI Jenkins +--- + test/unit/lib/json/json_parse.c/json_parse_ut.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/unit/lib/json/json_parse.c/json_parse_ut.c b/test/unit/lib/json/json_parse.c/json_parse_ut.c +index 121acce4f..2ee1110ec 100644 +--- a/test/unit/lib/json/json_parse.c/json_parse_ut.c ++++ b/test/unit/lib/json/json_parse.c/json_parse_ut.c +@@ -9,9 +9,11 @@ + + #include "json/json_parse.c" + ++#define JSONVALUE_NUM 100 ++ + static uint8_t g_buf[1000]; + static void *g_end; +-static struct spdk_json_val g_vals[100]; ++static struct spdk_json_val g_vals[JSONVALUE_NUM]; + static int g_cur_val; + + /* Fill buf with raw data */ +@@ -30,7 +32,7 @@ static int g_cur_val; + BUF_SETUP(in); \ + CU_ASSERT(spdk_json_parse(g_buf, sizeof(in) - 1, NULL, 0, &g_end, flags) == num_vals); \ + memset(g_vals, 0, sizeof(g_vals)); \ +- CU_ASSERT(spdk_json_parse(g_buf, sizeof(in) - 1, g_vals, sizeof(g_vals), &g_end, flags | SPDK_JSON_PARSE_FLAG_DECODE_IN_PLACE) == num_vals); \ ++ CU_ASSERT(spdk_json_parse(g_buf, sizeof(in) - 1, g_vals, JSONVALUE_NUM, &g_end, flags | SPDK_JSON_PARSE_FLAG_DECODE_IN_PLACE) == num_vals); \ + CU_ASSERT(g_end == g_buf + sizeof(in) - sizeof(trailing)); \ + CU_ASSERT(memcmp(g_end, trailing, sizeof(trailing) - 1) == 0); \ + g_cur_val = 0 +-- +2.37.2.windows.2 + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..806751e7dc3e9fda11103d67ce443f5032716f96 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +# Makefile for source rpm +SPECFILE := spdk.spec +NAME := spdk +VERSION := 21.01.1 + +sources: + echo ${SPECFILE} + tar -zcvf ${NAME}-${VERSION}.tar.gz ${NAME}-$(VERSION) + +source: sources + if test ! -d SOURCES; then mkdir SOURCES; fi + cp *.tar.gz *.patch SOURCES \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..99ec7fe14a6f267a0d5d6c724091a358ac27eafe --- /dev/null +++ b/deploy.sh @@ -0,0 +1,10 @@ +mkdir -p /data/spdk-tmp +cp spdk-21.01.1 /data/spdk-tmp +cd /data/spdk-tmp +tar -xzvf v21.01.1.tar.gz +cp *.patch spdk-21.01.1/ +cd spdk-21.01.1 +git init +git add . +git commit -s + diff --git a/spdk.spec b/spdk.spec index a90ce7940d99c93a00cb375ce1d49a2dfba5786e..326aa25e9e0f94a73710b37f5816cf24401d1813 100644 --- a/spdk.spec +++ b/spdk.spec @@ -4,7 +4,7 @@ Name: spdk Version: 21.01.1 -Release: 7 +Release: 8 Summary: Set of libraries and utilities for high performance user-mode storage License: BSD and MIT URL: http://spdk.io @@ -38,6 +38,7 @@ Patch26: 0026-Fix-race-condition-in-continuous-setup-and-teardown-.patch Patch27: 0027-Change-log-level-in-poll-timeout.patch Patch28: 0028-configure-add-CONFIG_HAVE_ARC4RANDOM.patch Patch29: 0029-Enable-unittest-in-make-check.patch +Patch30: 0030-bdev-modify-the-malformed-space-in-code-format.patch %define package_version %{version}-%{release} @@ -212,6 +213,9 @@ mv doc/output/html/ %{install_docdir} %changelog +* Thu Nov 24 2022 Tongkunkun - 21.01.1-8 +- json: fix wrong param in json_parse_ut.c calling function 'spdk_json_parse' + * Tue Nov 1 2022 Weifeng Su - 21.01.1-7 - Enable unittest