[Libguestfs] [PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls

2023-06-27 Thread Richard W.M. Jones
Since OCaml 4 the old and confusing caml_enter_blocking_section and caml_leave_blocking_section calls have been replaced with caml_release_runtime_system and caml_acquire_runtime_system (in that order). Use the new names. --- generator/OCaml.ml | 5 +++-- ocaml/guestfs-c.c | 5 +++-- 2 files cha

[Libguestfs] [PATCH libguestfs 4/4] ocaml/t/guestfs_065_implicit_close.ml: Skip this test on OCaml 5

2023-06-27 Thread Richard W.M. Jones
Link: https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 --- ocaml/t/guestfs_065_implicit_close.ml | 8 1 file changed, 8 insertions(+) diff --git a/ocaml/t/guestfs_065_implicit_close.ml b/ocaml/t/guestfs_065_implicit_close.ml index f2dfecbd5c..04

[Libguestfs] [PATCH libguestfs 0/4] Fix ups for OCaml 5

2023-06-27 Thread Richard W.M. Jones
No action required here as I have pushed this already, this is just for your information. Rich. ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH libguestfs 2/4] ocaml: Release runtime lock around guestfs_close

2023-06-27 Thread Richard W.M. Jones
When finalizing the handle we call guestfs_close. This function could be long-running (eg. it may have to shut down the qemu subprocess), so release the runtime lock. --- ocaml/guestfs-c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c index 8c8aa46096

[Libguestfs] [PATCH libguestfs 3/4] ocaml: Conditionally acquire the lock in callbacks

2023-06-27 Thread Richard W.M. Jones
This fix was originally suggested by Jürgen Hötzel (link below) which I have lightly modified so it works with OCaml <= 4 too. Link: https://listman.redhat.com/archives/libguestfs/2023-May/031640.html Link: https://discuss.ocaml.org/t/test-caml-state-and-conditionally-caml-acquire-runtime-system-

Re: [Libguestfs] [PATCH v4 16/24] nbd/server: Support 64-bit block status

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: The NBD spec states that if the client negotiates extended headers, the server must avoid NBD_REPLY_TYPE_BLOCK_STATUS and instead use NBD_REPLY_TYPE_BLOCK_STATUS_EXT which supports 64-bit lengths, even if the reply does not need more than 32 bits. As of this

Re: [Libguestfs] [PATCH v4 17/24] nbd/server: Enable initial support for extended headers

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Time to start supporting clients that request extended headers. Now we can finally reach the code added across several previous patches. Even though the NBD spec has been altered to allow us to accept NBD_CMD_READ larger than the max payload size (provided o

Re: [Libguestfs] [PATCH v4 18/24] nbd/client: Plumb errp through nbd_receive_replies

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Instead of ignoring the low-level error just to refabricate our own message to pass to the caller, we can just plump the caller's errp down to the low level. Signed-off-by: Eric Blake --- v4: new patch [Vladimir] --- block/nbd.c | 16 ++-- 1

Re: [Libguestfs] [PATCH v4 19/24] nbd/client: Initial support for extended headers

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Update the client code to be able to send an extended request, and parse an extended header from the server. Note that since we reject any structured reply with a too-large payload, we can always normalize a valid header back into the compact form, so that th

Re: [Libguestfs] [PATCH v4 20/24] nbd/client: Accept 64-bit block status chunks

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Once extended mode is enabled, we need to accept 64-bit status replies (even for replies that don't exceed a 32-bit length). It is easier to normalize narrow replies into wide format so that the rest of our code only has to handle one width. Although a serve

Re: [Libguestfs] [PATCH v4 21/24] nbd/client: Request extended headers during negotiation

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd is used to connect to the kernel module (as nbd.ko does not expect them, but expects us to do the negotiation in userspa

Re: [Libguestfs] [PATCH v4 22/24] nbd/server: Refactor list of negotiated meta contexts

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Peform several minor refactorings of how the list of negotiated meta contexts is managed, to make upcoming patches easier: Promote the internal type NBDExportMetaContexts to the public opaque type NBDMetaContexts, and mark exp const. Use a shorter member name

Re: [Libguestfs] [PATCH v4 23/24] nbd/server: Prepare for per-request filtering of BLOCK_STATUS

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 22:15, Eric Blake wrote: On Thu, Jun 08, 2023 at 08:56:52AM -0500, Eric Blake wrote: The next commit will add support for the optional extension NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can request that the server only return a subset of negotiated contexts,

[Libguestfs] [v2v PATCH] docs/virt-v2v: document libvirt system instance startup

2023-06-27 Thread Laszlo Ersek
It has frequently tripped us up that on RHEL / Fedora, installing the right set of libvirt RPMs (such as the one pulled in by "libvirt-daemon-kvm") does not result in an immediately running libvirt system instance. Document the need, and the simplest method, for starting libvirt up manually. Than

Re: [Libguestfs] [PATCH v4 24/24] nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Allow a client to request a subset of negotiated meta contexts. For example, a client may ask to use a single connection to learn about both block status and dirty bitmaps, but where the dirty bitmap queries only need to be performed on a subset of the disk;