Rebase along stable-1.28 branch

resolves: rhbz#2011709

Drop obsolete documentation related to thread model in vddk plugin
related: rhbz#2018463
This commit is contained in:
Richard W.M. Jones 2021-11-29 10:44:05 +00:00
parent b3fb585f58
commit 36d6c29dea
30 changed files with 693 additions and 51 deletions

View File

@ -0,0 +1,124 @@
From 5b58b7f23c014878dcb499d1626c53a25960c7b0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 10 Nov 2021 13:02:46 +0000
Subject: [PATCH] rust: Use correct type of C char on ARM and RISC-V platforms
On ARM and RISC-V platforms, C char is unsigned (compared to signed on
other platforms). This results in the error message attached when
compiling the rust plugin. This problem has probably existed for a
long time, but I only tried to compile the bindings on riscv64 and
aarch64 today.
The fix is to use c_char instead of i8. See:
https://stackoverflow.com/a/47684200
make: Entering directory '/home/rjones/d/nbdkit/plugins/rust'
cargo build --release
Compiling nbdkit v0.2.0 (/home/rjones/d/nbdkit/plugins/rust)
error[E0308]: mismatched types
--> src/lib.rs:985:19
|
985 | name: unsafe{ NAME.as_ptr() } as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error[E0308]: mismatched types
--> src/lib.rs:986:13
|
986 | longname,
| ^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error[E0308]: mismatched types
--> src/lib.rs:987:13
|
987 | version,
| ^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error[E0308]: mismatched types
--> src/lib.rs:988:13
|
988 | description,
| ^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error[E0308]: mismatched types
--> src/lib.rs:993:13
|
993 | config_help,
| ^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error[E0308]: mismatched types
--> src/lib.rs:1015:13
|
1015 | magic_config_key,
| ^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0308`.
error: could not compile `nbdkit`
To learn more, run the command again with --verbose.
make: *** [Makefile:1063: target/release/libnbdkit.rlib] Error 101
make: Leaving directory '/home/rjones/d/nbdkit/plugins/rust'
(cherry picked from commit 413f3fa5a0c7c8d35fb273fb0ed62ad73ed7a4f5)
---
plugins/rust/src/lib.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/plugins/rust/src/lib.rs b/plugins/rust/src/lib.rs
index 4f39b2ec..9fadfa98 100644
--- a/plugins/rust/src/lib.rs
+++ b/plugins/rust/src/lib.rs
@@ -965,25 +965,25 @@ impl Builder {
});
let config_help = S::config_help()
- .map(|_| unsafe {CONFIG_HELP.as_ptr()} as *const i8)
+ .map(|_| unsafe {CONFIG_HELP.as_ptr()} as *const c_char)
.unwrap_or(ptr::null());
let description = S::description()
- .map(|_| unsafe {DESCRIPTION.as_ptr()} as *const i8)
+ .map(|_| unsafe {DESCRIPTION.as_ptr()} as *const c_char)
.unwrap_or(ptr::null());
let longname = S::longname()
- .map(|_| unsafe {LONGNAME.as_ptr()} as *const i8)
+ .map(|_| unsafe {LONGNAME.as_ptr()} as *const c_char)
.unwrap_or(ptr::null());
let magic_config_key = S::magic_config_key()
- .map(|_| unsafe {MAGIC_CONFIG_KEY.as_ptr()} as *const i8)
+ .map(|_| unsafe {MAGIC_CONFIG_KEY.as_ptr()} as *const c_char)
.unwrap_or(ptr::null());
let version = S::version()
- .map(|_| unsafe {VERSION.as_ptr()} as *const i8)
+ .map(|_| unsafe {VERSION.as_ptr()} as *const c_char)
.unwrap_or(ptr::null());
let plugin = Plugin {
_struct_size: mem::size_of::<Plugin>() as u64,
_api_version: 2,
_thread_model: ThreadModel::Parallel as c_int,
- name: unsafe{ NAME.as_ptr() } as *const i8,
+ name: unsafe{ NAME.as_ptr() } as *const c_char,
longname,
version,
description,
--
2.31.1

View File

@ -0,0 +1,34 @@
From 53b8aac0afa12ccb37112c80f1e4cdea44904206 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 15 Nov 2021 21:57:04 +0000
Subject: [PATCH] tests: Remove redundant comment
Commit e3abac4e5519b0d51c9a34a41af97f63920f3f32 which originally added
the OCaml plugin back in 2014 added this comment. At the time the
test was novel because it compiled a plugin (instead of testing either
an existing plugin or one of the example plugins which is designed to
testing against). However lots of other tests do that now so the
comment is redundant.
Thanks: Laszlo Ersek
(cherry picked from commit 6b821fdc4ced4fc0af3fe2480d3ca43cb6476a6d)
---
tests/Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6bba56ba..5ef90b6f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1081,8 +1081,6 @@ if HAVE_OCAML
LIBGUESTFS_TESTS += test-ocaml
-# This is somewhat different from the other tests because we have
-# to build an actual plugin here.
test_ocaml_SOURCES = test-ocaml.c test.h
test_ocaml_CFLAGS = \
$(WARNINGS_CFLAGS) \
--
2.31.1

View File

@ -0,0 +1,319 @@
From fa7ad10dd02278afb458915a2ce4ab70832af3f0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 16 Nov 2021 10:09:13 +0000
Subject: [PATCH] tests: Use compound literal array for nbd_connect_command
parameter
Instead of having a separate char *args[] local variable, we can use a
compound literal array (C99 feature). This change is just
refactoring.
Acked-by: Laszlo Ersek <lersek@redhat.com>
(cherry picked from commit 69bb2722bf150b1938d87d03ffe0ec20eb28129b)
---
tests/README.tests | 7 ++++---
tests/test-connect.c | 8 ++++----
tests/test-curl-cookie-script.c | 21 ++++++++++-----------
tests/test-curl-header-script.c | 21 ++++++++++-----------
tests/test-delay.c | 13 ++++++-------
tests/test-layers.c | 27 ++++++++++++++-------------
tests/test-newstyle.c | 10 +++++-----
tests/test-null.c | 8 +++++---
tests/test-oldstyle.c | 10 +++++-----
tests/test-pause.c | 11 ++++++-----
tests/test-random.c | 9 +++++----
tests/test-split.c | 12 ++++++------
12 files changed, 80 insertions(+), 77 deletions(-)
diff --git a/tests/README.tests b/tests/README.tests
index 595c3c19..a55e6958 100644
--- a/tests/README.tests
+++ b/tests/README.tests
@@ -65,9 +65,10 @@ To test a plugin using libnbd
Open a libnbd handle, and configure it using:
- char *args[] = { "nbdkit", "-s", "--exit-with-parent",
- "plugin", <plugin args ...>, NULL };
- nbd_connect_command (nbd, args);
+ nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "plugin", <plugin args ...>, NULL });
Perform tests via libnbd functions.
diff --git a/tests/test-connect.c b/tests/test-connect.c
index f6b494ac..13143f46 100644
--- a/tests/test-connect.c
+++ b/tests/test-connect.c
@@ -53,10 +53,10 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent", "example1", NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "example1", NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-curl-cookie-script.c b/tests/test-curl-cookie-script.c
index 481207b5..45e3d136 100644
--- a/tests/test-curl-cookie-script.c
+++ b/tests/test-curl-cookie-script.c
@@ -104,17 +104,16 @@ main (int argc, char *argv[])
perror ("asprintf");
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent", "-v",
- "curl",
- "-D", "curl.verbose=1",
- "http://localhost/disk",
- "cookie-script=" SCRIPT,
- "cookie-script-renew=1",
- usp_param, /* unix-socket-path=... */
- NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent", "-v",
+ "curl",
+ "-D", "curl.verbose=1",
+ "http://localhost/disk",
+ "cookie-script=" SCRIPT,
+ "cookie-script-renew=1",
+ usp_param, /* unix-socket-path=... */
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-curl-header-script.c b/tests/test-curl-header-script.c
index a151af05..afe16591 100644
--- a/tests/test-curl-header-script.c
+++ b/tests/test-curl-header-script.c
@@ -126,17 +126,16 @@ main (int argc, char *argv[])
perror ("asprintf");
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent", "-v",
- "curl",
- "-D", "curl.verbose=1",
- "http://localhost/disk",
- "header-script=" SCRIPT,
- "header-script-renew=1",
- usp_param, /* unix-socket-path=... */
- NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent", "-v",
+ "curl",
+ "-D", "curl.verbose=1",
+ "http://localhost/disk",
+ "header-script=" SCRIPT,
+ "header-script-renew=1",
+ usp_param, /* unix-socket-path=... */
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-delay.c b/tests/test-delay.c
index 736de529..b0e6f8de 100644
--- a/tests/test-delay.c
+++ b/tests/test-delay.c
@@ -56,13 +56,12 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent",
- "--filter", "delay",
- "memory", "1M",
- "wdelay=10", NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "--filter", "delay",
+ "memory", "1M",
+ "wdelay=10", NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-layers.c b/tests/test-layers.c
index 13c82289..0083b733 100644
--- a/tests/test-layers.c
+++ b/tests/test-layers.c
@@ -157,19 +157,20 @@ main (int argc, char *argv[])
}
/* Start nbdkit. */
- char *args[] = {
- "nbdkit", "--exit-with-parent", "-fvns",
- /* Because of asynchronous shutdown with threads, finalize
- * isn't reliably called unless we disable parallel.
- */
- "-t", "1",
- "--filter", ".libs/test-layers-filter3." SOEXT,
- "--filter", ".libs/test-layers-filter2." SOEXT,
- "--filter", ".libs/test-layers-filter1." SOEXT,
- ".libs/test-layers-plugin." SOEXT,
- "foo=bar",
- NULL};
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "--exit-with-parent", "-fvns",
+ /* Because of asynchronous shutdown with
+ * threads, finalize isn't reliably
+ * called unless we disable parallel.
+ */
+ "-t", "1",
+ "--filter", ".libs/test-layers-filter3." SOEXT,
+ "--filter", ".libs/test-layers-filter2." SOEXT,
+ "--filter", ".libs/test-layers-filter1." SOEXT,
+ ".libs/test-layers-plugin." SOEXT,
+ "foo=bar",
+ NULL }) == -1) {
dprintf (orig_stderr, "nbd_connect_command: %s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-newstyle.c b/tests/test-newstyle.c
index d96c7e44..1f5d1ca3 100644
--- a/tests/test-newstyle.c
+++ b/tests/test-newstyle.c
@@ -49,11 +49,11 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent",
- "--newstyle", "file", "file-data", NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "--newstyle", "file", "file-data",
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-null.c b/tests/test-null.c
index 2205934f..d220999a 100644
--- a/tests/test-null.c
+++ b/tests/test-null.c
@@ -52,9 +52,11 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] =
- { "nbdkit", "-s", "--exit-with-parent", "null", "100M", NULL };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "null", "100M",
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-oldstyle.c b/tests/test-oldstyle.c
index 5147768a..0afe868f 100644
--- a/tests/test-oldstyle.c
+++ b/tests/test-oldstyle.c
@@ -49,11 +49,11 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent",
- "--oldstyle", "file", "file-data", NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "--oldstyle", "file", "file-data",
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-pause.c b/tests/test-pause.c
index 3c8ee520..e5a970d6 100644
--- a/tests/test-pause.c
+++ b/tests/test-pause.c
@@ -78,11 +78,12 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent", "--filter", "pause",
- "example1", "pause-control=" SOCKET, NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "--filter", "pause",
+ "example1", "pause-control=" SOCKET,
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-random.c b/tests/test-random.c
index 4316d2b3..b7716efa 100644
--- a/tests/test-random.c
+++ b/tests/test-random.c
@@ -72,10 +72,11 @@ main (int argc, char *argv[])
}
snprintf (sizearg, sizeof sizearg, "%d", SIZE);
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent", "random", sizearg, NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "random", sizearg,
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
diff --git a/tests/test-split.c b/tests/test-split.c
index be53590d..657e5b5a 100644
--- a/tests/test-split.c
+++ b/tests/test-split.c
@@ -51,12 +51,12 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- char *args[] = {
- "nbdkit", "-s", "--exit-with-parent",
- "split", "split1", "split2", "file=split3" /* leave file= to test */,
- NULL
- };
- if (nbd_connect_command (nbd, args) == -1) {
+ if (nbd_connect_command (nbd,
+ (char *[]) {
+ "nbdkit", "-s", "--exit-with-parent",
+ "split", "split1", "split2",
+ "file=split3" /* leave file= to test */,
+ NULL }) == -1) {
fprintf (stderr, "%s\n", nbd_get_error ());
exit (EXIT_FAILURE);
}
--
2.31.1

View File

@ -0,0 +1,120 @@
From e8af3f231361966e12eedf5656d7ef70432cf9ff Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 27 Nov 2021 09:51:33 +0000
Subject: [PATCH] common/regions: Implement append_region_end
This function was documented but not implemented, add the
implementation.
(cherry picked from commit 6f7485f8bcda1a316a57048207ce2c3092af544a)
---
common/regions/regions.c | 60 ++++++++++++++++++++++++++--------------
common/regions/regions.h | 2 --
2 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/common/regions/regions.c b/common/regions/regions.c
index bb7a278c..841c5c40 100644
--- a/common/regions/regions.c
+++ b/common/regions/regions.c
@@ -119,10 +119,10 @@ append_padding (regions *rs, uint64_t alignment)
}
int
-append_region_len (regions *rs,
+append_region_va (regions *rs,
const char *description, uint64_t len,
uint64_t pre_aligment, uint64_t post_alignment,
- enum region_type type, ...)
+ enum region_type type, va_list ap)
{
struct region region;
@@ -139,24 +139,10 @@ append_region_len (regions *rs,
region.len = len;
region.end = region.start + region.len - 1;
region.type = type;
- if (type == region_file) {
- va_list ap;
- size_t i;
-
- va_start (ap, type);
- i = va_arg (ap, size_t);
- va_end (ap);
- region.u.i = i;
- }
- else if (type == region_data) {
- va_list ap;
- const unsigned char *data;
-
- va_start (ap, type);
- data = va_arg (ap, const unsigned char *);
- va_end (ap);
- region.u.data = data;
- }
+ if (type == region_file)
+ region.u.i = va_arg (ap, size_t);
+ else if (type == region_data)
+ region.u.data = va_arg (ap, const unsigned char *);
if (append_one_region (rs, region) == -1)
return -1;
@@ -169,3 +155,37 @@ append_region_len (regions *rs,
return 0;
}
+
+int
+append_region_len (regions *rs,
+ const char *description, uint64_t len,
+ uint64_t pre_aligment, uint64_t post_alignment,
+ enum region_type type, ...)
+{
+ va_list ap;
+ int r;
+
+ va_start (ap, type);
+ r = append_region_va (rs, description, len,
+ pre_aligment, post_alignment, type, ap);
+ va_end (ap);
+ return r;
+}
+
+int
+append_region_end (regions *rs,
+ const char *description, uint64_t end,
+ uint64_t pre_aligment, uint64_t post_alignment,
+ enum region_type type, ...)
+{
+ va_list ap;
+ int r;
+ uint64_t len;
+
+ va_start (ap, type);
+ len = end - virtual_size (rs) + 1;
+ r = append_region_va (rs, description, len,
+ pre_aligment, post_alignment, type, ap);
+ va_end (ap);
+ return r;
+}
diff --git a/common/regions/regions.h b/common/regions/regions.h
index 13fc41e2..6dfd5d88 100644
--- a/common/regions/regions.h
+++ b/common/regions/regions.h
@@ -123,7 +123,6 @@ extern int append_region_len (regions *regions,
uint64_t pre_aligment, uint64_t post_alignment,
enum region_type type, ...);
-#if 0
/* Same as append_region_len (above) but instead of specifying the
* size of the main region, specify the end byte as an offset. Note
* the end byte is included in the region, it's is NOT the end+1 byte.
@@ -132,6 +131,5 @@ extern int append_region_end (regions *regions,
const char *description, uint64_t end,
uint64_t pre_aligment, uint64_t post_alignment,
enum region_type type, ...);
-#endif
#endif /* NBDKIT_REGIONS_H */
--
2.31.1

View File

@ -1,4 +1,4 @@
From 96ee8f6f2844bceb8e27ffb442359a2b7521c950 Mon Sep 17 00:00:00 2001
From 47ef0cabbe9bc9f00231f97a36958ef14d700bb4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 21 Oct 2021 14:49:52 +0100
Subject: [PATCH] vddk: Refactor how -D vddk.stats=1 is collected

View File

@ -1,4 +1,4 @@
From f388c9b6c983d395ced0d4f467980b182d0a1b84 Mon Sep 17 00:00:00 2001
From 9d5df60596a1ed385276152f339c682b2b2b4197 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 21 Oct 2021 15:10:00 +0100
Subject: [PATCH] vddk: Extend -D vddk.stats=1 to show number of calls and

View File

@ -1,4 +1,4 @@
From cc1c3b4ab57a1662bf87766161167fac40a78c0e Mon Sep 17 00:00:00 2001
From 38a6af436dc2ea296d695fd6d1b8c78f25b1f760 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 21 Oct 2021 22:55:17 +0100
Subject: [PATCH] vddk: Simplify and consolidate VDDK_CALL_START/END macros

View File

@ -1,4 +1,4 @@
From 4bd9926c0e506fdb04976d348b1c7614865c8b06 Mon Sep 17 00:00:00 2001
From 61dcc78d7bfc6f5aa67f0952cfe40150a522d24a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 22 Oct 2021 18:00:27 +0100
Subject: [PATCH] vddk: Document troubleshooting performance problems

View File

@ -1,4 +1,4 @@
From eb6ccb03d0ca12ef19e5705cd96f81824910087b Mon Sep 17 00:00:00 2001
From d6da3198bc3123b5b7df54f51b53cc5536611193 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 23 Oct 2021 16:16:39 +0100
Subject: [PATCH] vddk: Include VDDK major library version in --dump-plugin

View File

@ -1,4 +1,4 @@
From 0139f1815e9259fa789d84d2f32d30ee59bd728c Mon Sep 17 00:00:00 2001
From 4524146c29efa16b7b260d9de967b548cdb63da2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 23 Oct 2021 16:24:27 +0100
Subject: [PATCH] vddk: Add logical and physical sector size to -D

View File

@ -1,4 +1,4 @@
From a5f73cbcbb6891d2e3c2cb541d47b44a236785ce Mon Sep 17 00:00:00 2001
From b3de173ca581a174f2b60cb364e97bbd3c6e294b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 23 Oct 2021 19:41:07 +0100
Subject: [PATCH] vddk: Fix typo in debug message

View File

@ -1,4 +1,4 @@
From 1cb810a416e1bdd78a8e5df886a3185d3cfa54d0 Mon Sep 17 00:00:00 2001
From 8e7e6c019b328b878e5e40a49ab085d330135424 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 23 Oct 2021 19:50:52 +0100
Subject: [PATCH] vddk: Only print vddk_library_version when we managed to load

View File

@ -1,4 +1,4 @@
From 8780009ec092d9cc5a408b7597d88aa54db13639 Mon Sep 17 00:00:00 2001
From 817a29ee1ab91d10331c1f1618b89f59969af1b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 25 Oct 2021 08:36:53 +0100
Subject: [PATCH] vddk: Print one line in --dump-plugin output for each VDDK

View File

@ -1,4 +1,4 @@
From e34016cbba4340b25f9a52c98db918aa72b38a7c Mon Sep 17 00:00:00 2001
From 3f0f35c915c027fe849cedd0c2fdb5506a4e9997 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 26 Oct 2021 19:46:32 +0100
Subject: [PATCH] vddk: Move minimum version to VDDK 6.5

View File

@ -1,4 +1,4 @@
From 69b989b37c8e33f52d928c7202146e9e11a2a93c Mon Sep 17 00:00:00 2001
From 6f50e32f21bd54448e2aba6dd4943e5b742b0527 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 27 Oct 2021 11:57:35 +0100
Subject: [PATCH] vddk: Add read, write and wait asynchronous functions

View File

@ -1,4 +1,4 @@
From 98a499c0e9d08f208474759012ec3ed823ce2335 Mon Sep 17 00:00:00 2001
From 5decae06af9e5942b5f16f17d818aa0855f22f4f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 27 Oct 2021 12:20:31 +0100
Subject: [PATCH] vddk: Start to split VDDK over several files

View File

@ -1,4 +1,4 @@
From d602150dbb5ebacea42c25a0f6c8c26c45766a49 Mon Sep 17 00:00:00 2001
From 35bb25a9587b2f975c7c1fc7086ba4230f374c82 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 27 Oct 2021 12:30:41 +0100
Subject: [PATCH] vddk: Refactor -D vddk.stats=1 into a new file

View File

@ -1,4 +1,4 @@
From 5744b0000addaa0d50b6e0ee8e4540349623be0a Mon Sep 17 00:00:00 2001
From c5d4bbac3e5af55f6f553d76eb1ccf2db3cbf6f3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 27 Oct 2021 10:17:22 +0100
Subject: [PATCH] vddk: Implement parallel thread model

View File

@ -1,4 +1,4 @@
From eda9dd7f5e610fd4e17019813c5a045f0b3603df Mon Sep 17 00:00:00 2001
From f88fe1ef24432351bc9586220dcbc94c028ffc9c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 29 Oct 2021 20:56:55 +0100
Subject: [PATCH] vddk: Assume that VixDiskLib_Flush is available

View File

@ -1,4 +1,4 @@
From 1b2b386c9a254808a25fbfce3640c96bdb8cf9be Mon Sep 17 00:00:00 2001
From 93d3272142226d791af3604f6b9f617d89f27aa5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 29 Oct 2021 21:02:54 +0100
Subject: [PATCH] vddk: Simplify detection of VDDK symbols and baseline 6.5

View File

@ -1,4 +1,4 @@
From 2363e76ab34a2e11b57970d82161f73453a4a8ec Mon Sep 17 00:00:00 2001
From 85e2b3109219ea093dddf97a8f8bf276a204c1a0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 30 Oct 2021 08:34:28 +0100
Subject: [PATCH] vddk: Remove some whitespace from a couple of functions

View File

@ -1,4 +1,4 @@
From 6c0034cf8802d466b170135fec0d6a97d1eb2f2a Mon Sep 17 00:00:00 2001
From 3daef1e007872dad52b6edf40a810093093bc316 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 30 Oct 2021 08:27:39 +0100
Subject: [PATCH] vddk: Move config, debug/error and utility functions around

View File

@ -1,4 +1,4 @@
From 6459704cc66f5fa0a2e6fc1e199458b77327fe52 Mon Sep 17 00:00:00 2001
From 67daf95c311dd72401c6c09741d2b39b9c95098d Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Fri, 5 Nov 2021 20:36:42 +0200
Subject: [PATCH] common/utils/test-vector.c: Add vector benchmarks

View File

@ -1,4 +1,4 @@
From 5454ced7c8cfc2ba278c2635eecb9a5e4841e613 Mon Sep 17 00:00:00 2001
From 6f84d6ddb60555ea9be4db8ac3ec99a3bdcc8ac0 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Fri, 5 Nov 2021 22:16:26 +0200
Subject: [PATCH] common/urils/vector.c: Optimize vector append

View File

@ -1,4 +1,4 @@
From 304f180b61fa28421b9901d2173a280e633b55c2 Mon Sep 17 00:00:00 2001
From f4908c9dc3c4c7d72377de6ac647235dedbe4cd8 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Fri, 5 Nov 2021 22:59:38 +0200
Subject: [PATCH] common/utils/vector: Rename `alloc` to `cap`

View File

@ -1,4 +1,4 @@
From a53a2234147543b04ee483aff7b9895c0d5082b5 Mon Sep 17 00:00:00 2001
From 178fda5aa3c4d0678d56ce311f7f3024b4118063 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Sat, 6 Nov 2021 00:03:11 +0200
Subject: [PATCH] common/utils/vector: Rename `size` to `len`
@ -139,7 +139,7 @@ index 81fe4ed0..1675d21c 100644
return NULL;
}
diff --git a/common/regions/regions.h b/common/regions/regions.h
index 13fc41e2..34a398cd 100644
index 6dfd5d88..3d562316 100644
--- a/common/regions/regions.h
+++ b/common/regions/regions.h
@@ -84,17 +84,17 @@ extern void free_regions (regions *regions)

View File

@ -1,4 +1,4 @@
From ece6d7e1a5827de17e86a20f7dae5f6f853d419b Mon Sep 17 00:00:00 2001
From 26e5e1c15ab15b2d9929adb7615a00e5ad5c24a1 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Mon, 8 Nov 2021 19:47:57 +0200
Subject: [PATCH] podwrapper.pl.in: Use short commit date

View File

@ -1,4 +1,4 @@
From 2955179919fc6233427b82d27ae61755b2b5e3d7 Mon Sep 17 00:00:00 2001
From 011825417fd8c82c7e707f178bdf12208dccdf99 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 9 Nov 2021 09:07:42 +0000
Subject: [PATCH] ocaml: Replace "noalloc" with [@@noalloc] annotation

View File

@ -0,0 +1,39 @@
From 75e670f6ed6a8063b3026b5b891a1f0feb872454 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 27 Nov 2021 16:44:41 +0000
Subject: [PATCH] vddk: Drop obsolete documentation related to thread model
Since commit 1eecf15fc3 ("vddk: Implement parallel thread model") we
have implemented a parallel thread model in this plugin, and thread
handling is believed to be safe and in conformity with the VDDK
documentation. Remove obsolete documentation contradicting this.
Reported-by: Ming Xie
Fixes: commit 1eecf15fc3d8ea253ccec4f5883fdbb9aa6f8c2b
(cherry picked from commit 370ecb711c23f9143c933e13468e11d688d0d651)
---
plugins/vddk/nbdkit-vddk-plugin.pod | 8 --------
1 file changed, 8 deletions(-)
diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod
index ce82a734..acec0bd2 100644
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
@@ -452,14 +452,6 @@ sector boundaries. This is because the VDDK Read and Write APIs only
take sector numbers. If your client needs finer granularity, you can
use L<nbdkit-blocksize-filter(1)> with the setting C<minblock=512>.
-=head2 Threads
-
-Handling threads in the VDDK API is complex and does not map well to
-any of the thread models offered by nbdkit (see
-L<nbdkit-plugin(3)/THREADS>). The plugin uses the nbdkit
-C<SERIALIZE_REQUESTS> model, but technically even this is not
-completely safe. This is a subject of future work.
-
=head2 Out of memory errors
In the verbose log you may see errors like:
--
2.31.1

View File

@ -51,7 +51,7 @@ ExclusiveArch: x86_64
Name: nbdkit
Version: 1.28.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: NBD server
License: BSD
@ -76,30 +76,35 @@ Source3: copy-patches.sh
# https://gitlab.com/nbdkit/nbdkit/-/commits/rhel-9.0/
# Patches.
Patch0001: 0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch
Patch0002: 0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch
Patch0003: 0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch
Patch0004: 0004-vddk-Document-troubleshooting-performance-problems.patch
Patch0005: 0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch
Patch0006: 0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch
Patch0007: 0007-vddk-Fix-typo-in-debug-message.patch
Patch0008: 0008-vddk-Only-print-vddk_library_version-when-we-managed.patch
Patch0009: 0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch
Patch0010: 0010-vddk-Move-minimum-version-to-VDDK-6.5.patch
Patch0011: 0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch
Patch0012: 0012-vddk-Start-to-split-VDDK-over-several-files.patch
Patch0013: 0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch
Patch0014: 0014-vddk-Implement-parallel-thread-model.patch
Patch0015: 0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch
Patch0016: 0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch
Patch0017: 0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch
Patch0018: 0018-vddk-Move-config-debug-error-and-utility-functions-a.patch
Patch0019: 0019-common-utils-test-vector.c-Add-vector-benchmarks.patch
Patch0020: 0020-common-urils-vector.c-Optimize-vector-append.patch
Patch0021: 0021-common-utils-vector-Rename-alloc-to-cap.patch
Patch0022: 0022-common-utils-vector-Rename-size-to-len.patch
Patch0023: 0023-podwrapper.pl.in-Use-short-commit-date.patch
Patch0024: 0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch
Patch0001: 0001-rust-Use-correct-type-of-C-char-on-ARM-and-RISC-V-pl.patch
Patch0002: 0002-tests-Remove-redundant-comment.patch
Patch0003: 0003-tests-Use-compound-literal-array-for-nbd_connect_com.patch
Patch0004: 0004-common-regions-Implement-append_region_end.patch
Patch0005: 0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch
Patch0006: 0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch
Patch0007: 0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch
Patch0008: 0008-vddk-Document-troubleshooting-performance-problems.patch
Patch0009: 0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch
Patch0010: 0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch
Patch0011: 0011-vddk-Fix-typo-in-debug-message.patch
Patch0012: 0012-vddk-Only-print-vddk_library_version-when-we-managed.patch
Patch0013: 0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch
Patch0014: 0014-vddk-Move-minimum-version-to-VDDK-6.5.patch
Patch0015: 0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch
Patch0016: 0016-vddk-Start-to-split-VDDK-over-several-files.patch
Patch0017: 0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch
Patch0018: 0018-vddk-Implement-parallel-thread-model.patch
Patch0019: 0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch
Patch0020: 0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch
Patch0021: 0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch
Patch0022: 0022-vddk-Move-config-debug-error-and-utility-functions-a.patch
Patch0023: 0023-common-utils-test-vector.c-Add-vector-benchmarks.patch
Patch0024: 0024-common-urils-vector.c-Optimize-vector-append.patch
Patch0025: 0025-common-utils-vector-Rename-alloc-to-cap.patch
Patch0026: 0026-common-utils-vector-Rename-size-to-len.patch
Patch0027: 0027-podwrapper.pl.in-Use-short-commit-date.patch
Patch0028: 0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch
Patch0029: 0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch
BuildRequires: make
%if 0%{patches_touch_autotools}
@ -1213,10 +1218,11 @@ export LIBGUESTFS_TRACE=1
%changelog
* Tue Nov 09 2021 Richard W.M. Jones <rjones@redhat.com> - 1.28.2-1
* Mon Nov 29 2021 Richard W.M. Jones <rjones@redhat.com> - 1.28.2-2
- Move nbdkit-null-plugin to nbdkit-server package
resolves: rhbz#2021154
- Add asynchronous support in nbdkit-vddk-plugin
- Drop obsolete documentation related to thread model in vddk plugin
resolves: rhbz#2018463
- Rebase to new stable branch version 1.28.2
resolves: rhbz#2011709