[Libguestfs] [libnbd PATCH 3/3] info: Simplify shutdown calls

2023-08-29 Thread Eric Blake
Depending on command line options and server capabilities, nbdinfo has legitimate reasons to either be in opt mode or fully connected at the time a handle is ready to close. Previously, to avoid unwanted error messages, we had to manually check state to call the correct function out of

[Libguestfs] [libnbd PATCH 2/3] api: Add new COVER_OPT_MODE flag to nbd_shutdown

2023-08-29 Thread Eric Blake
When nbd_set_opt_mode() was introduced, we did not adjust the behavior of nbd_shutdown(), so as a result it fails if attempted after the initial connection but before nbd_opt_abort() or nbd_opt_go(). To avoid spurious error messages, at least nbdinfo has to perform special-casing on whether it is

[Libguestfs] [libnbd PATCH 1/3] tests: Test behavior of nbd_shutdown during opt mode

2023-08-29 Thread Eric Blake
When we added nbd_set_opt_mode (v1.4), we did not do anything special to nbd_shutdown(). As a result, clients that use opt mode when available, but which want to gracefully close a socket rather than just forcefully disconnect via nbd_close(), have to take care to check the current state and then

[Libguestfs] [libnbd PATCH 0/3] Simplify nbd_shutdown vs. opt mode

2023-08-29 Thread Eric Blake
While working on a larger set of patches to make nbdinfo favor NBD_OPT_INFO over NBD_OPT_GO where possible (which requires use of nbd_set_opt_mode(,true) in more cases), I noticed that it got unwieldy to have to pick the correct shutdown function in all code paths. So I propose making the API

Re: [Libguestfs] [libnbd PATCH v9 5/7] rust: async: Add a couple of integration tests

2023-08-29 Thread Eric Blake
On Sat, Aug 26, 2023 at 11:29:58AM +, Tage Johansson wrote: > Add a couple of integration tests as rust/tests/test_async_*.rs. They > are very similar to the tests for the synchronous API. > --- > rust/tests/test_async_460_block_status.rs | 98 >

Re: [Libguestfs] [libnbd PATCH 07/10] rust: Add a couple of integration tests

2023-08-29 Thread Eric Blake
On Wed, Jul 19, 2023 at 09:09:51AM +, Tage Johansson wrote: > A couple of integration tests are added in rust/tests. They are mostly > ported from the OCaml tests. > --- > rust/tests/test_210_opt_abort.rs | 39 + > rust/tests/test_220_opt_list.rs | 85

Re: [Libguestfs] [libnbd PATCH v9 0/7] Rust Bindings for Libnbd

2023-08-29 Thread Richard W.M. Jones
On Tue, Aug 29, 2023 at 09:09:02AM +0100, Richard W.M. Jones wrote: > > Thanks, I pushed this series now. > > There are some CI failures, see: > https://gitlab.com/nbdkit/libnbd/-/pipelines/984910205 > > Can you suggest some fixes for these, or otherwise we can go through > them on the call

[Libguestfs] libnbd | Failed pipeline for master | 9afb980d

2023-08-29 Thread GitLab
Pipeline #984910205 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 9afb980d ( https://gitlab.com/nbdkit/libnbd/-/commit/9afb980d05d6144129c899285e44779757a380e8 ) Commit Message: rust: Check that

Re: [Libguestfs] [libnbd PATCH v9 0/7] Rust Bindings for Libnbd

2023-08-29 Thread Richard W.M. Jones
Thanks, I pushed this series now. There are some CI failures, see: https://gitlab.com/nbdkit/libnbd/-/pipelines/984910205 Can you suggest some fixes for these, or otherwise we can go through them on the call today. Rich. -- Richard Jones, Virtualization Group, Red Hat