diff --git a/0008-Add-nbddump-tool.patch b/0001-Add-nbddump-tool.patch similarity index 99% rename from 0008-Add-nbddump-tool.patch rename to 0001-Add-nbddump-tool.patch index 577f2d7..63c8c68 100644 --- a/0008-Add-nbddump-tool.patch +++ b/0001-Add-nbddump-tool.patch @@ -1,4 +1,4 @@ -From 70337b56e672a484f39be89b79917f883204f149 Mon Sep 17 00:00:00 2001 +From 3cdec593e221231333d0dcdab0556e0c149ac606 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jun 2022 09:07:27 +0100 Subject: [PATCH] Add nbddump tool @@ -46,7 +46,7 @@ nice colourized output. create mode 100755 dump/test-version.sh diff --git a/.gitignore b/.gitignore -index 22aa43c..870e916 100644 +index 498eabc..3771655 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ Makefile.in @@ -56,8 +56,8 @@ index 22aa43c..870e916 100644 +/bash-completion/nbddump /bash-completion/nbdfuse /bash-completion/nbdinfo - /common/include/test-checked-overflow -@@ -56,6 +57,8 @@ Makefile.in + /common/include/test-array-size +@@ -57,6 +58,8 @@ Makefile.in !/docs/nbd_close.3 !/docs/nbd_create.pod !/docs/nbd_get_err??.3 @@ -151,10 +151,10 @@ index a740be9..a342003 100644 complete -o default -F _nbdinfo nbdinfo complete -o default -F _nbdsh nbdsh diff --git a/configure.ac b/configure.ac -index b2137cc..5467276 100644 +index 2b28678..488f3b0 100644 --- a/configure.ac +++ b/configure.ac -@@ -563,6 +563,7 @@ AC_CONFIG_FILES([Makefile +@@ -570,6 +570,7 @@ AC_CONFIG_FILES([Makefile common/utils/Makefile copy/Makefile docs/Makefile diff --git a/0001-ocaml-Add-valgrind-suppression-for-OCaml-4.14-bug.patch b/0001-ocaml-Add-valgrind-suppression-for-OCaml-4.14-bug.patch deleted file mode 100644 index 87eb489..0000000 --- a/0001-ocaml-Add-valgrind-suppression-for-OCaml-4.14-bug.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7d17629974bcca7caf830c7b0e7c754fa6aad180 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sun, 19 Jun 2022 18:13:34 +0100 -Subject: [PATCH] ocaml: Add valgrind suppression for OCaml 4.14 bug - -==3869068== Memcheck, a memory error detector -==3869068== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. -==3869068== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info -==3869068== Command: ./test_010_import.opt -==3869068== -==3869068== Syscall param sigaltstack(ss) points to uninitialised byte(s) -==3869068== at 0x49DF24B: sigaltstack (syscall-template.S:120) -==3869068== by 0x1A1365: caml_terminate_signals (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== by 0x1C0C33: caml_startup_common (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== by 0x1C0CAE: caml_main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== by 0x15CDC1: main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== Address 0x1ffeffe500 is on thread 1's stack -==3869068== in frame #1, created by caml_terminate_signals (???:) -==3869068== -==3869068== Syscall param sigaltstack(ss) points to uninitialised byte(s) -==3869068== at 0x49DF24B: sigaltstack (syscall-template.S:120) -==3869068== by 0x1A1365: caml_terminate_signals (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== by 0x1B1B6F: caml_do_exit (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== by 0x15CDC8: main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt) -==3869068== Address 0x1ffeffe4d0 is on thread 1's stack -==3869068== in frame #1, created by caml_terminate_signals (???:) - -(cherry picked from commit 73dec295f3bbdf8afbfd548eb5a776dee27b0ac0) ---- - valgrind/ocaml.suppressions | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/valgrind/ocaml.suppressions b/valgrind/ocaml.suppressions -index 84f8841..202ddc5 100644 ---- a/valgrind/ocaml.suppressions -+++ b/valgrind/ocaml.suppressions -@@ -84,3 +84,13 @@ - ... - fun:caml_setup_stack_overflow_detection - } -+ -+# Potential bug in OCaml 4.14 -+# https://github.com/ocaml/ocaml/issues/11335 -+{ -+ caml_terminate_signals_uninitialized_sigaltstack -+ Memcheck:Param -+ sigaltstack(ss) -+ fun:sigaltstack -+ fun:caml_terminate_signals -+} --- -2.31.1 - diff --git a/0009-dump-Visually-separate-columns-0-7-and-8-15.patch b/0002-dump-Visually-separate-columns-0-7-and-8-15.patch similarity index 99% rename from 0009-dump-Visually-separate-columns-0-7-and-8-15.patch rename to 0002-dump-Visually-separate-columns-0-7-and-8-15.patch index 7028acb..ca8727d 100644 --- a/0009-dump-Visually-separate-columns-0-7-and-8-15.patch +++ b/0002-dump-Visually-separate-columns-0-7-and-8-15.patch @@ -1,4 +1,4 @@ -From f157912189927f00fed9c313b2a3207e98d45564 Mon Sep 17 00:00:00 2001 +From cf2edbb9e5ff7d37b089d6c96df001eec74984c4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jun 2022 21:09:39 +0100 Subject: [PATCH] dump: Visually separate columns 0-7 and 8-15 diff --git a/0002-ocaml-Add-further-valgrind-suppression.patch b/0002-ocaml-Add-further-valgrind-suppression.patch deleted file mode 100644 index abc52ca..0000000 --- a/0002-ocaml-Add-further-valgrind-suppression.patch +++ /dev/null @@ -1,55 +0,0 @@ -From e8c83a655d47f7ca46c6e730364bca09716dca67 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 20 Jun 2022 20:24:27 +0100 -Subject: [PATCH] ocaml: Add further valgrind suppression - -After discussion with the OCaml team we think these are both bugs in -valgrind, not OCaml, but we still need a suppression. - -==4145632== Syscall param sigaltstack(ss) points to uninitialised byte(s) -==4145632== at 0xCC5E24B: sigaltstack (syscall-template.S:120) -==4145632== by 0xD7F46CC: caml_stop_stack_overflow_detection (in /home/rjones/d/nbdkit/tests/test-ocaml-plugin.so) -==4145632== by 0xD7F277E: caml_startup_common (in /home/rjones/d/nbdkit/tests/test-ocaml-plugin.so) -==4145632== by 0xD7F27CC: caml_startup (in /home/rjones/d/nbdkit/tests/test-ocaml-plugin.so) -==4145632== by 0xC986891: constructor (plugin.c:64) -==4145632== by 0xC133CED: call_init (dl-init.c:70) -==4145632== by 0xC133DDB: _dl_init (dl-init.c:117) -==4145632== by 0xCD72A73: _dl_catch_exception (dl-error-skeleton.c:182) -==4145632== by 0xC13A955: dl_open_worker (dl-open.c:808) -==4145632== by 0xCD72A1D: _dl_catch_exception (dl-error-skeleton.c:208) -==4145632== by 0xC13ACEB: _dl_open (dl-open.c:883) -==4145632== by 0xCCA7EC9: dlopen_doit (dlopen.c:56) -==4145632== by 0xCD72A1D: _dl_catch_exception (dl-error-skeleton.c:208) -==4145632== by 0xCD72AD2: _dl_catch_error (dl-error-skeleton.c:227) -==4145632== by 0xCCA79DE: _dlerror_run (dlerror.c:138) -==4145632== by 0xCCA7F67: dlopen@@GLIBC_2.34 (dlopen.c:71) -==4145632== by 0x10F775: main (main.c:833) -==4145632== Address 0x1ffeffaca0 is on thread 1's stack -==4145632== in frame #1, created by caml_stop_stack_overflow_detection (???:) - -(cherry picked from nbdkit commit dba71bf2be6dbcc1585f36a6779395c9fe2cc49d) - -(cherry picked from commit 9057e474b5de78d3a37f063ab197a5989f4294fb) ---- - valgrind/ocaml.suppressions | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/valgrind/ocaml.suppressions b/valgrind/ocaml.suppressions -index 202ddc5..3a660ee 100644 ---- a/valgrind/ocaml.suppressions -+++ b/valgrind/ocaml.suppressions -@@ -94,3 +94,11 @@ - fun:sigaltstack - fun:caml_terminate_signals - } -+ -+{ -+ caml_stop_stack_overflow_detection_uninitialized_sigaltstack -+ Memcheck:Param -+ sigaltstack(ss) -+ fun:sigaltstack -+ fun:caml_stop_stack_overflow_detection -+} --- -2.31.1 - diff --git a/0010-dump-Fix-build-on-i686.patch b/0003-dump-Fix-build-on-i686.patch similarity index 94% rename from 0010-dump-Fix-build-on-i686.patch rename to 0003-dump-Fix-build-on-i686.patch index d9832f0..6ddde74 100644 --- a/0010-dump-Fix-build-on-i686.patch +++ b/0003-dump-Fix-build-on-i686.patch @@ -1,4 +1,4 @@ -From db737715e58b653e72f94a493f87ffa7c10b6976 Mon Sep 17 00:00:00 2001 +From b8e1b582e417de651fac93416624990361213263 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jun 2022 22:27:43 +0100 Subject: [PATCH] dump: Fix build on i686 diff --git a/0003-valgrind-Update-comment-about-valgrind-bug-affecting.patch b/0003-valgrind-Update-comment-about-valgrind-bug-affecting.patch deleted file mode 100644 index 2d71ad3..0000000 --- a/0003-valgrind-Update-comment-about-valgrind-bug-affecting.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5d5c8350b580333667cc3703be3638396e57c649 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 21 Jun 2022 12:21:55 +0100 -Subject: [PATCH] valgrind: Update comment about valgrind bug affecting OCaml - -Fixes: 73dec295f3 ("ocaml: Add valgrind suppression for OCaml 4.14 bug") -Fixes: 9057e474b5 ("ocaml: Add further valgrind suppression") - -(cherry picked from nbdkit commit 6f1584ca76979f4e5da912c9d36fbd12ab18d8e2) - -(cherry picked from commit 573103697c0fc214800e198f145ae40b02a4fcb5) ---- - valgrind/ocaml.suppressions | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/valgrind/ocaml.suppressions b/valgrind/ocaml.suppressions -index 3a660ee..6238ace 100644 ---- a/valgrind/ocaml.suppressions -+++ b/valgrind/ocaml.suppressions -@@ -85,8 +85,8 @@ - fun:caml_setup_stack_overflow_detection - } - --# Potential bug in OCaml 4.14 --# https://github.com/ocaml/ocaml/issues/11335 -+# Valgrind bug affecting OCaml 4.14 -+# https://bugs.kde.org/show_bug.cgi?id=455711 - { - caml_terminate_signals_uninitialized_sigaltstack - Memcheck:Param --- -2.31.1 - diff --git a/0004-copy-Print-program-name-in-some-error-messages.patch b/0004-copy-Print-program-name-in-some-error-messages.patch deleted file mode 100644 index 24b056d..0000000 --- a/0004-copy-Print-program-name-in-some-error-messages.patch +++ /dev/null @@ -1,40 +0,0 @@ -From eb49c1d99d021ed1d2389eda4c8db4be89cef6c1 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 27 Jun 2022 16:17:14 +0100 -Subject: [PATCH] copy: Print program name in some error messages - -Updates: commit 8d444b41d09a700c7ee6f9182a649f3f2d325abb -(cherry picked from commit fb187e0eb9bad74e826289bc4ca421d8c4db2e79) ---- - copy/multi-thread-copying.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/copy/multi-thread-copying.c b/copy/multi-thread-copying.c -index afcbe32..06cdb8e 100644 ---- a/copy/multi-thread-copying.c -+++ b/copy/multi-thread-copying.c -@@ -429,8 +429,8 @@ finished_read (void *vp, int *error) - struct command *command = vp; - - if (*error) { -- fprintf (stderr, "read at offset %" PRId64 " failed: %s\n", -- command->offset, strerror (*error)); -+ fprintf (stderr, "%s: read at offset %" PRId64 " failed: %s\n", -+ prog, command->offset, strerror (*error)); - exit (EXIT_FAILURE); - } - -@@ -606,8 +606,8 @@ finished_command (void *vp, int *error) - struct command *command = vp; - - if (*error) { -- fprintf (stderr, "write at offset %" PRId64 " failed: %s\n", -- command->offset, strerror (*error)); -+ fprintf (stderr, "%s: write at offset %" PRId64 " failed: %s\n", -+ prog, command->offset, strerror (*error)); - exit (EXIT_FAILURE); - } - --- -2.31.1 - diff --git a/0011-dump-Fix-tests-on-Debian-10.patch b/0004-dump-Fix-tests-on-Debian-10.patch similarity index 94% rename from 0011-dump-Fix-tests-on-Debian-10.patch rename to 0004-dump-Fix-tests-on-Debian-10.patch index c697371..ff03295 100644 --- a/0011-dump-Fix-tests-on-Debian-10.patch +++ b/0004-dump-Fix-tests-on-Debian-10.patch @@ -1,4 +1,4 @@ -From fba7245a2ad5259d224f035217573a9f82385d42 Mon Sep 17 00:00:00 2001 +From 4aff2e5be9fab82fb9ae0841ef2696cc75a5bb66 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jun 2022 22:31:00 +0100 Subject: [PATCH] dump: Fix tests on Debian 10 diff --git a/0012-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch b/0005-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch similarity index 93% rename from 0012-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch rename to 0005-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch index b938aad..c0d5350 100644 --- a/0012-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch +++ b/0005-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch @@ -1,4 +1,4 @@ -From d9f0d3fe17e98947052df2c41969326eac2ece41 Mon Sep 17 00:00:00 2001 +From 36a78e18ce7312c714d11f1d62a163526ce01107 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jun 2022 22:35:05 +0100 Subject: [PATCH] dump/dump-data.sh: Test requires nbdkit 1.22 diff --git a/0005-lib-Display-kTLS-status.patch b/0005-lib-Display-kTLS-status.patch deleted file mode 100644 index 37d3957..0000000 --- a/0005-lib-Display-kTLS-status.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b1faf8da338580679545297236e4bbf824183935 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 27 Jun 2022 19:17:29 +0100 -Subject: [PATCH] lib: Display kTLS status - -In debug output, for gnutls builds supporting kTLS (kernel- or -hardware-accelerated TLS), display the status. - -Typical output: - -libnbd: debug: nbd1: nbd_connect_uri: connection is using TLS: cipher AES-256-GCM (256 bits) key exchange ECDHE-RSA mac AEAD (0 bits) kTLS disabled -(cherry picked from commit 764284e71986081e7a8b6969541aab76d38e35ce) ---- - configure.ac | 4 +++- - lib/crypto.c | 26 ++++++++++++++++++++++++-- - 2 files changed, 27 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e89c17c..b2137cc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -175,7 +175,9 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[ - old_LIBS="$LIBS" - LIBS="$GNUTLS_LIBS $LIBS" - AC_CHECK_FUNCS([\ -- gnutls_session_set_verify_cert]) -+ gnutls_session_set_verify_cert \ -+ gnutls_transport_is_ktls_enabled \ -+ ]) - LIBS="$old_LIBS" - ]) - -diff --git a/lib/crypto.c b/lib/crypto.c -index 7eed490..1272888 100644 ---- a/lib/crypto.c -+++ b/lib/crypto.c -@@ -28,6 +28,7 @@ - - #ifdef HAVE_GNUTLS - #include -+#include - #endif - - #include "internal.h" -@@ -703,15 +704,36 @@ nbd_internal_crypto_debug_tls_enabled (struct nbd_handle *h) - const gnutls_cipher_algorithm_t cipher = gnutls_cipher_get (session); - const gnutls_kx_algorithm_t kx = gnutls_kx_get (session); - const gnutls_mac_algorithm_t mac = gnutls_mac_get (session); -+#ifdef HAVE_GNUTLS_TRANSPORT_IS_KTLS_ENABLED -+ const char *ktls_status; -+ gnutls_transport_ktls_enable_flags_t ktls_enabled; -+#else -+ const char *ktls_status = "disabled"; -+#endif -+ -+#ifdef HAVE_GNUTLS_TRANSPORT_IS_KTLS_ENABLED -+ ktls_enabled = gnutls_transport_is_ktls_enabled (session); -+ switch (ktls_enabled) { -+ case GNUTLS_KTLS_RECV: ktls_status = "enabled receive only"; break; -+ case GNUTLS_KTLS_SEND: ktls_status = "enabled send only"; break; -+ case GNUTLS_KTLS_DUPLEX: ktls_status = "enabled"; break; -+ default: -+ if ((int) ktls_enabled == 0) -+ ktls_status = "disabled"; -+ else -+ ktls_status = "unknown"; -+ } -+#endif - - debug (h, - "connection is using TLS: " -- "cipher %s (%zu bits) key exchange %s mac %s (%zu bits)", -+ "cipher %s (%zu bits) key exchange %s mac %s (%zu bits) kTLS %s", - gnutls_cipher_get_name (cipher), - 8 * gnutls_cipher_get_key_size (cipher), - gnutls_kx_get_name (kx), - gnutls_mac_get_name (mac), -- 8 * gnutls_mac_get_key_size (mac) -+ 8 * gnutls_mac_get_key_size (mac), -+ ktls_status - ); - } - } --- -2.31.1 - diff --git a/0013-copy-Store-the-preferred-block-size-in-the-operation.patch b/0006-copy-Store-the-preferred-block-size-in-the-operation.patch similarity index 98% rename from 0013-copy-Store-the-preferred-block-size-in-the-operation.patch rename to 0006-copy-Store-the-preferred-block-size-in-the-operation.patch index 2eacda1..cae669a 100644 --- a/0013-copy-Store-the-preferred-block-size-in-the-operation.patch +++ b/0006-copy-Store-the-preferred-block-size-in-the-operation.patch @@ -1,4 +1,4 @@ -From f50e1ee777ff34e19e978cc60133ab4fd02b3e3c Mon Sep 17 00:00:00 2001 +From 392818d207a34b6d70adfc4285e3d01ce368195b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 28 Jun 2022 18:27:58 +0100 Subject: [PATCH] copy: Store the preferred block size in the operations struct diff --git a/0006-copy-nbd-ops.c-Move-related-extents-functions-togeth.patch b/0006-copy-nbd-ops.c-Move-related-extents-functions-togeth.patch deleted file mode 100644 index fe8cc64..0000000 --- a/0006-copy-nbd-ops.c-Move-related-extents-functions-togeth.patch +++ /dev/null @@ -1,123 +0,0 @@ -From fc6dac90563ce6f456e75bb7aa13487a7aa3855a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 28 Jun 2022 11:25:20 +0100 -Subject: [PATCH] copy/nbd-ops.c: Move related extents functions together - -Simple code motion, no change. - -(cherry picked from commit 1a46903197697c9cc4993d96536c32c3a8ec8aa8) ---- - copy/nbd-ops.c | 78 +++++++++++++++++++++++++++----------------------- - 1 file changed, 42 insertions(+), 36 deletions(-) - -diff --git a/copy/nbd-ops.c b/copy/nbd-ops.c -index b3ecfd3..fa97fca 100644 ---- a/copy/nbd-ops.c -+++ b/copy/nbd-ops.c -@@ -350,41 +350,6 @@ nbd_ops_asynch_zero (struct rw *rw, struct command *command, - return true; - } - --static int --add_extent (void *vp, const char *metacontext, -- uint64_t offset, uint32_t *entries, size_t nr_entries, -- int *error) --{ -- extent_list *ret = vp; -- size_t i; -- -- if (strcmp (metacontext, "base:allocation") != 0 || *error) -- return 0; -- -- for (i = 0; i < nr_entries; i += 2) { -- struct extent e; -- -- e.offset = offset; -- e.length = entries[i]; -- -- /* Note we deliberately don't care about the HOLE flag. There is -- * no need to read extent that reads as zeroes. We will convert -- * to it to a hole or allocated extents based on the command line -- * arguments. -- */ -- e.zero = (entries[i+1] & LIBNBD_STATE_ZERO) != 0; -- -- if (extent_list_append (ret, e) == -1) { -- perror ("realloc"); -- exit (EXIT_FAILURE); -- } -- -- offset += entries[i]; -- } -- -- return 0; --} -- - static unsigned - nbd_ops_in_flight (struct rw *rw, size_t index) - { -@@ -440,12 +405,18 @@ nbd_ops_asynch_notify_write (struct rw *rw, size_t index) - } - } - --/* This is done synchronously, but that's fine because commands from -+/* Get the extents. -+ * -+ * This is done synchronously, but that's fine because commands from - * the previous work range in flight continue to run, it's difficult - * to (sanely) start new work until we have the full list of extents, - * and in almost every case the remote NBD server can answer our - * request for extents in a single round trip. - */ -+static int add_extent (void *vp, const char *metacontext, -+ uint64_t offset, uint32_t *entries, size_t nr_entries, -+ int *error); -+ - static void - nbd_ops_get_extents (struct rw *rw, size_t index, - uint64_t offset, uint64_t count, -@@ -508,6 +479,41 @@ nbd_ops_get_extents (struct rw *rw, size_t index, - free (exts.ptr); - } - -+static int -+add_extent (void *vp, const char *metacontext, -+ uint64_t offset, uint32_t *entries, size_t nr_entries, -+ int *error) -+{ -+ extent_list *ret = vp; -+ size_t i; -+ -+ if (strcmp (metacontext, "base:allocation") != 0 || *error) -+ return 0; -+ -+ for (i = 0; i < nr_entries; i += 2) { -+ struct extent e; -+ -+ e.offset = offset; -+ e.length = entries[i]; -+ -+ /* Note we deliberately don't care about the HOLE flag. There is -+ * no need to read extent that reads as zeroes. We will convert -+ * to it to a hole or allocated extents based on the command line -+ * arguments. -+ */ -+ e.zero = (entries[i+1] & LIBNBD_STATE_ZERO) != 0; -+ -+ if (extent_list_append (ret, e) == -1) { -+ perror ("realloc"); -+ exit (EXIT_FAILURE); -+ } -+ -+ offset += entries[i]; -+ } -+ -+ return 0; -+} -+ - static struct rw_ops nbd_ops = { - .ops_name = "nbd_ops", - .close = nbd_ops_close, --- -2.31.1 - diff --git a/0014-copy-Use-preferred-block-size-for-copying.patch b/0007-copy-Use-preferred-block-size-for-copying.patch similarity index 99% rename from 0014-copy-Use-preferred-block-size-for-copying.patch rename to 0007-copy-Use-preferred-block-size-for-copying.patch index fbfa042..c039d43 100644 --- a/0014-copy-Use-preferred-block-size-for-copying.patch +++ b/0007-copy-Use-preferred-block-size-for-copying.patch @@ -1,4 +1,4 @@ -From 764603605a0ab7aaf3547d1669ca6bdffef0a732 Mon Sep 17 00:00:00 2001 +From 6ff003b58c8ca3339e1169ce7cfdea0bd0c69c38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 28 Jun 2022 21:58:55 +0100 Subject: [PATCH] copy: Use preferred block size for copying diff --git a/0007-copy-nbd-ops.c-Fix-whitespace-for-indentation.patch b/0007-copy-nbd-ops.c-Fix-whitespace-for-indentation.patch deleted file mode 100644 index be004fa..0000000 --- a/0007-copy-nbd-ops.c-Fix-whitespace-for-indentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3431b727c43d77007e7c2975c2ad6763ed5e9611 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 28 Jun 2022 14:07:32 +0100 -Subject: [PATCH] copy/nbd-ops.c: Fix whitespace for indentation - -(cherry picked from commit 1ce9bc07a1e1226fd62cdc1443a5146053e8f6ff) ---- - copy/nbd-ops.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/copy/nbd-ops.c b/copy/nbd-ops.c -index fa97fca..3bc26ba 100644 ---- a/copy/nbd-ops.c -+++ b/copy/nbd-ops.c -@@ -252,7 +252,7 @@ nbd_ops_start_multi_conn (struct rw *rw) - - static size_t - nbd_ops_synch_read (struct rw *rw, -- void *data, size_t len, uint64_t offset) -+ void *data, size_t len, uint64_t offset) - { - struct rw_nbd *rwn = (struct rw_nbd *) rw; - -@@ -271,7 +271,7 @@ nbd_ops_synch_read (struct rw *rw, - - static void - nbd_ops_synch_write (struct rw *rw, -- const void *data, size_t len, uint64_t offset) -+ const void *data, size_t len, uint64_t offset) - { - struct rw_nbd *rwn = (struct rw_nbd *) rw; - --- -2.31.1 - diff --git a/0015-dump-Add-another-example-to-the-manual.patch b/0008-dump-Add-another-example-to-the-manual.patch similarity index 92% rename from 0015-dump-Add-another-example-to-the-manual.patch rename to 0008-dump-Add-another-example-to-the-manual.patch index 253348c..ead2f15 100644 --- a/0015-dump-Add-another-example-to-the-manual.patch +++ b/0008-dump-Add-another-example-to-the-manual.patch @@ -1,4 +1,4 @@ -From 046e18bdb4cdbaa2786f04450894bf0996dfc8d9 Mon Sep 17 00:00:00 2001 +From eada47ee5a81cf74cd8079f5c1e791dec9701d9d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 2 Jul 2022 17:12:46 +0100 Subject: [PATCH] dump: Add another example to the manual diff --git a/libnbd.spec b/libnbd.spec index a79b69c..2a6b0a1 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -11,8 +11,8 @@ %global source_directory 1.12-stable Name: libnbd -Version: 1.12.4 -Release: 3%{?dist} +Version: 1.12.5 +Release: 1%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -32,21 +32,14 @@ Source3: copy-patches.sh # https://gitlab.com/nbdkit/libnbd/-/commits/rhel-9.1/ # Patches. -Patch0001: 0001-ocaml-Add-valgrind-suppression-for-OCaml-4.14-bug.patch -Patch0002: 0002-ocaml-Add-further-valgrind-suppression.patch -Patch0003: 0003-valgrind-Update-comment-about-valgrind-bug-affecting.patch -Patch0004: 0004-copy-Print-program-name-in-some-error-messages.patch -Patch0005: 0005-lib-Display-kTLS-status.patch -Patch0006: 0006-copy-nbd-ops.c-Move-related-extents-functions-togeth.patch -Patch0007: 0007-copy-nbd-ops.c-Fix-whitespace-for-indentation.patch -Patch0008: 0008-Add-nbddump-tool.patch -Patch0009: 0009-dump-Visually-separate-columns-0-7-and-8-15.patch -Patch0010: 0010-dump-Fix-build-on-i686.patch -Patch0011: 0011-dump-Fix-tests-on-Debian-10.patch -Patch0012: 0012-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch -Patch0013: 0013-copy-Store-the-preferred-block-size-in-the-operation.patch -Patch0014: 0014-copy-Use-preferred-block-size-for-copying.patch -Patch0015: 0015-dump-Add-another-example-to-the-manual.patch +Patch0001: 0001-Add-nbddump-tool.patch +Patch0002: 0002-dump-Visually-separate-columns-0-7-and-8-15.patch +Patch0003: 0003-dump-Fix-build-on-i686.patch +Patch0004: 0004-dump-Fix-tests-on-Debian-10.patch +Patch0005: 0005-dump-dump-data.sh-Test-requires-nbdkit-1.22.patch +Patch0006: 0006-copy-Store-the-preferred-block-size-in-the-operation.patch +Patch0007: 0007-copy-Use-preferred-block-size-for-copying.patch +Patch0008: 0008-dump-Add-another-example-to-the-manual.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool @@ -343,8 +336,8 @@ make %{?_smp_mflags} check || { %changelog -* Mon Jul 06 2022 Richard W.M. Jones - 1.12.4-3 -- Rebase to new stable branch version 1.12.4 +* Tue Jul 12 2022 Richard W.M. Jones - 1.12.5-1 +- Rebase to new stable branch version 1.12.5 resolves: rhbz#2059288 - New tool: nbddump - nbdcopy: Use preferred block size for copying diff --git a/sources b/sources index 081c409..b47d21a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.12.4.tar.gz) = e57f70d6db7bb85ecbd11f30355d7b2b98889ffa9208b2ae666a5d3e7325eb30d7ede90eb3d0e78fdfc231f58e35b889d40bc8b08cb73bd06747a24b122bea35 -SHA512 (libnbd-1.12.4.tar.gz.sig) = 7acf5d39c5fbecb1fd3142a1dccf95f98edb15a85c9f82f51440f873cfe5c4e037076f86a55a7808c28bb939e98600c05f7c488e6cb9656b445ae00b062cb2a9 +SHA512 (libnbd-1.12.5.tar.gz) = 1ea8c0d0a8a95c42c91d72623d0ade58f37c9acafcd8793b33884929673b943669ebec6ffb8b6e6c5cb296c84241bf6f3f5619f0efea6d1fbdd7c161be6232b3 +SHA512 (libnbd-1.12.5.tar.gz.sig) = 0b4dbde0e357fcd22e47176306024f8137726ede9284f89d9bc10baeab75fa4d9bcc0013f804e2f350ad32bad788a177dadd5252f2270edfb5012e6ec7b675bb