[Libguestfs] [PATCH libnbd 4/5] Revert "copy, info: Include common/utils/human-size.h"

2023-09-03 Thread Richard W.M. Jones
This reverts commit XXX FILL IN LATER XXX --- copy/main.c | 2 +- info/show.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/copy/main.c b/copy/main.c index d2f415dc47..6928a4acde 100644 --- a/copy/main.c +++ b/copy/main.c @@ -39,7 +39,7 @@ #include #include

[Libguestfs] [PATCH libnbd 5/5] copy: Allow human sizes for --queue-size, --request-size, --sparse

2023-09-03 Thread Richard W.M. Jones
Allow these options to be specified using human sizes, for example this now works: nbdcopy --request-size=32M ... --- copy/copy-sparse-allocated.sh| 2 +- copy/copy-sparse-no-extents.sh | 2 +- copy/copy-sparse-request-size.sh | 2 +- copy/main.c | 37

[Libguestfs] [PATCH libnbd 2/5] common/include: Import the human_size_parse (nbdkit_parse_size) function

2023-09-03 Thread Richard W.M. Jones
This function is copied from nbdkit commit XXX [fill in after nbdkit change is upstream] XXX --- .gitignore | 1 + common/include/Makefile.am | 6 ++ common/include/human-size.h | 137 +++ common/include/test-human-size.c | 133

[Libguestfs] [PATCH libnbd 3/5] common: Combine human-size.h headers into one

2023-09-03 Thread Richard W.M. Jones
Copy the human_size() function from common/utils/ into the new human-size.h header in common/include/. Remove human-size.c and combine the tests into one. --- common/include/human-size.h | 51 ++ common/include/test-human-size.c | 79 +---

[Libguestfs] [PATCH libnbd 1/5] copy, info: Include common/utils/human-size.h

2023-09-03 Thread Richard W.M. Jones
The next commit will add a new "human-size.h" header copied in from nbdkit. This breaks existing code that uses common/utils/human-size.h (which we will combine later). As a temporary hack to maintain bisection, make sure we are using the deprecated "human-size.h" header. This hack will be

[Libguestfs] [PATCH libnbd 0/5] copy: Allow human sizes for --queue-size, etc

2023-09-03 Thread Richard W.M. Jones
See companion patch: Subject: [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include This is the second part of the patch. It adds the new human_size_parse function to libnbd and then uses it for parsing --queue-size, --request-size and --sparse. The main

[Libguestfs] [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include

2023-09-03 Thread Richard W.M. Jones
This is broadly simple code motion, intended so that we can reuse the same code in libnbd. --- common/include/Makefile.am | 6 ++ common/include/human-size.h | 137 +++ common/include/test-human-size.c | 133 ++ server/public.c

[Libguestfs] [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include

2023-09-03 Thread Richard W.M. Jones
This is the first part of a pair of patch series which aim to let us use nbdkit_parse_size (or rather, an equivalent common function) in nbdcopy, so we can write: nbdcopy --request-size=32M ... We can't do that now which was annoying me earlier in the week. This commit creates a new function