Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Richard W.M. Jones
On Tue, Feb 21, 2023 at 05:03:23PM +0100, Laszlo Ersek wrote: > Rich mentioned that libnbd had actually encountered a bug of this kind, > just not specifically in exec*p*(). Probably this one? https://github.com/libguestfs/libguestfs/commit/e1c9bbb3d1d5ef81490977060120dda0963eb567 glibc was pret

Re: [Libguestfs] [libnbd PATCH v3 05/29] vector: (mostly) factor out DEFINE_VECTOR_EMPTY

2023-02-22 Thread Richard W.M. Jones
On Tue, Feb 21, 2023 at 05:23:52PM +0100, Laszlo Ersek wrote: > On 2/20/23 21:38, Eric Blake wrote: > > On Mon, Feb 20, 2023 at 06:03:13PM +0100, Laszlo Ersek wrote: > >> On 2/15/23 21:27, Eric Blake wrote: > >>> On Wed, Feb 15, 2023 at 03:11:34PM +0100, Laszlo Ersek wrote: > The "name##_iter"

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Laszlo Ersek
Sorry about replying for the second time. After having slept on it (not much, but some), some thoughts are emerging / being distilled about my own attitude. On 2/21/23 19:04, Daniel P. Berrangé wrote: > On Tue, Feb 21, 2023 at 06:53:39PM +0100, Laszlo Ersek wrote: >> >> More in general, this lesso

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Richard W.M. Jones
On Wed, Feb 22, 2023 at 09:48:04AM +0100, Laszlo Ersek wrote: > So: if the libnbd project can tolerate my attitude (approach#2), then > I'd like to proceed with this series (full scope), with me addressing > the v3 review feedback in v4, and so on. If not, then I'll abandon the > series, and try to

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Daniel P . Berrangé
On Tue, Feb 21, 2023 at 11:59:30PM +0100, Laszlo Ersek wrote: > On 2/21/23 19:04, Daniel P. Berrangé wrote: > > > AFAIK, libnbd/nbdkit haven't made a statement about what platforms > > they aim to target. In my response I'm more or less assuming though > > that you would only care about similar mo

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Laszlo Ersek
On 2/22/23 09:09, Richard W.M. Jones wrote: > On Tue, Feb 21, 2023 at 05:03:23PM +0100, Laszlo Ersek wrote: >> Rich mentioned that libnbd had actually encountered a bug of this kind, >> just not specifically in exec*p*(). > > Probably this one? > > https://github.com/libguestfs/libguestfs/commit/

Re: [Libguestfs] [libnbd PATCH v3 05/29] vector: (mostly) factor out DEFINE_VECTOR_EMPTY

2023-02-22 Thread Laszlo Ersek
On 2/22/23 09:17, Richard W.M. Jones wrote: > On Tue, Feb 21, 2023 at 05:23:52PM +0100, Laszlo Ersek wrote: >> This is doable, but I hope it's not expected that >> DEFINE_POINTER_VECTOR_TYPE() *enforce* that the element type be a pointer :) > > > You might ignore this for a first draft, but it i

Re: [Libguestfs] [PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:52PM -0600, Eric Blake wrote: [...] > @@ -1370,9 +1475,10 @@ of the newstyle negotiation. > Return a list of `NBD_REP_META_CONTEXT` replies, one per context, > followed by an `NBD_REP_ACK` or an error. > > -This option SHOULD NOT be requested unless stru

Re: [Libguestfs] [PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:54PM -0600, Eric Blake wrote: > Simple reply message > > @@ -1232,6 +1235,19 @@ The field has the following format: >will be faster than a regular write). Clients MUST NOT set the >`NBD_CMD_FLAG_FAST_ZERO` request flag unless this transmission flag >

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Laszlo Ersek
On 2/22/23 10:09, Richard W.M. Jones wrote: > On Wed, Feb 22, 2023 at 09:48:04AM +0100, Laszlo Ersek wrote: >> So: if the libnbd project can tolerate my attitude (approach#2), then >> I'd like to proceed with this series (full scope), with me addressing >> the v3 review feedback in v4, and so on. I

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Laszlo Ersek
On 2/22/23 10:25, Daniel P. Berrangé wrote: > On Tue, Feb 21, 2023 at 11:59:30PM +0100, Laszlo Ersek wrote: >> On 2/21/23 19:04, Daniel P. Berrangé wrote: >> >>> AFAIK, libnbd/nbdkit haven't made a statement about what platforms >>> they aim to target. In my response I'm more or less assuming thoug

[Libguestfs] libnbd | Failed pipeline for master | b5101fbc

2023-02-22 Thread GitLab
Pipeline #785487102 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: b5101fbc ( https://gitlab.com/nbdkit/libnbd/-/commit/b5101fbc59cbdaef47e7843c735e8cc9f63fce10 ) Commit Message: use space consisten

[Libguestfs] libnbd | Failed pipeline for master | 46d60f80

2023-02-22 Thread GitLab
Pipeline #785513769 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 46d60f80 ( https://gitlab.com/nbdkit/libnbd/-/commit/46d60f807ecaec8fd040b01c566b0cc6f7f827b7 ) Commit Message: TODO: coding style

Re: [Libguestfs] [libnbd PATCH v3 01/29] use space consistently in function and function-like macro invocations

2023-02-22 Thread Laszlo Ersek
On 2/15/23 15:11, Laszlo Ersek wrote: > We intend to place a space character between the function designator and > the opening parenthesis in a function call. We've been executing on that > mostly consistently; fix the few exceptions now. > > The same convention should be applied to the invocation

Re: [Libguestfs] [libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls

2023-02-22 Thread Laszlo Ersek
On 2/15/23 15:11, Laszlo Ersek wrote: > Apply the ideas in the previous patch to the C-language bindings > generator. > > Signed-off-by: Laszlo Ersek > --- > generator/C.ml | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) Merged this patch as commit b490830a9a78 ("

Re: [Libguestfs] [libnbd PATCH v3 03/29] socket activation: rename sa_(tmpdir|sockpath) to sact_(tmpdir|sockpath)

2023-02-22 Thread Laszlo Ersek
On 2/15/23 15:11, Laszlo Ersek wrote: > in POSIX reserves the "sa_" prefix: > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 > > Let's use "sact_" instead. > > Signed-off-by: Laszlo Ersek > --- > lib/internal.h | 4 ++--

Re: [Libguestfs] [libnbd PATCH v3 04/29] ocaml: rename "sa_u" to "saddr_u"

2023-02-22 Thread Laszlo Ersek
On 2/15/23 15:11, Laszlo Ersek wrote: > in POSIX reserves the "sa_" prefix: > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 > > Let's use "saddr_" instead. > > Signed-off-by: Laszlo Ersek > --- > ocaml/helpers.c | 8 > 1 file changed, 4 inse

[Libguestfs] libnbd | Failed pipeline for master | 0823a2da

2023-02-22 Thread GitLab
Pipeline #785532123 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 0823a2da ( https://gitlab.com/nbdkit/libnbd/-/commit/0823a2da75274da9381b01e0df348e849ae13706 ) Commit Message: ocaml: rename "sa_u

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Richard W.M. Jones
On Wed, Feb 22, 2023 at 09:25:04AM +, Daniel P. Berrangé wrote: > macOS is the real pain point because of its restrictive EULA > meaning you basically have to buy it. It makes it very much a second > class citizen for developers, unless they happen to have personal > apple hardware. FWIW I hav

[Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Richard W.M. Jones
I'm mainly posting this to the list as a back-up. It does work, it does _not_ improve performance in any noticable way. However I'm having lots of trouble getting HTTP/2 to work (with or without this patch) and that's stopping me from testing anything properly. Rich. __

[Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Richard W.M. Jones
Using the libcurl share interface we can share data between the separate curl easy handles in the pool. For more about this see: https://curl.se/libcurl/c/CURLSHOPT_SHARE.html https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b https://everything.curl.dev/libcurl/sharing --- plugins/

Re: [Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Laszlo Ersek
On 2/22/23 16:01, Richard W.M. Jones wrote: > Using the libcurl share interface we can share data between the > separate curl easy handles in the pool. For more about this see: > > https://curl.se/libcurl/c/CURLSHOPT_SHARE.html > https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b > h

Re: [Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Richard W.M. Jones
On Wed, Feb 22, 2023 at 04:52:35PM +0100, Laszlo Ersek wrote: ... > Seems sane to me in general, except for the fact that the documentation > at writes: > > """ > CURL_LOCK_DATA_CONNECT > > Put the connection cache in the share object and make all

[Libguestfs] libnbd | Failed pipeline for master | 367cebb6

2023-02-22 Thread GitLab
Pipeline #785829982 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 367cebb6 ( https://gitlab.com/nbdkit/libnbd/-/commit/367cebb63b018cf64ddb6174831fb07d269606f8 ) Commit Message: tests: Skip errors-

Re: [Libguestfs] [libnbd PATCH v3 05/29] vector: (mostly) factor out DEFINE_VECTOR_EMPTY

2023-02-22 Thread Laszlo Ersek
On 2/22/23 10:40, Laszlo Ersek wrote: > On 2/22/23 09:17, Richard W.M. Jones wrote: >> On Tue, Feb 21, 2023 at 05:23:52PM +0100, Laszlo Ersek wrote: > >>> This is doable, but I hope it's not expected that >>> DEFINE_POINTER_VECTOR_TYPE() *enforce* that the element type be a pointer :) >> >> >> You

Re: [Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Laszlo Ersek
On 2/22/23 17:00, Richard W.M. Jones wrote: > On Wed, Feb 22, 2023 at 04:52:35PM +0100, Laszlo Ersek wrote: > ... >> Seems sane to me in general, except for the fact that the documentation >> at writes: >> >> """ >> CURL_LOCK_DATA_CONNECT >> >> Put t

Re: [Libguestfs] [PATCH nbdkit] curl: Try to share as much as possible between handles in the pool

2023-02-22 Thread Richard W.M. Jones
On Wed, Feb 22, 2023 at 05:25:03PM +0100, Laszlo Ersek wrote: > On 2/22/23 17:00, Richard W.M. Jones wrote: > > On Wed, Feb 22, 2023 at 04:52:35PM +0100, Laszlo Ersek wrote: > > ... > >> Seems sane to me in general, except for the fact that the documentation > >> at

Re: [Libguestfs] [libnbd PATCH v3 05/29] vector: (mostly) factor out DEFINE_VECTOR_EMPTY

2023-02-22 Thread Richard W.M. Jones
On Wed, Feb 22, 2023 at 05:22:57PM +0100, Laszlo Ersek wrote: > On 2/22/23 10:40, Laszlo Ersek wrote: > > On 2/22/23 09:17, Richard W.M. Jones wrote: > >> On Tue, Feb 21, 2023 at 05:23:52PM +0100, Laszlo Ersek wrote: > > > >>> This is doable, but I hope it's not expected that > >>> DEFINE_POINTER_

Re: [Libguestfs] [libnbd PATCH v3 05/29] vector: (mostly) factor out DEFINE_VECTOR_EMPTY

2023-02-22 Thread Eric Blake
On Wed, Feb 22, 2023 at 08:17:09AM +, Richard W.M. Jones wrote: > > > We may still want some division of: > > > > > > DEFINE_VECTOR_TYPE (int_vector, int); > > > DEFINE_POINTER_VECTOR_TYPE (string_vector, char *, free); > > > > > > where under the hood, DEFINE_POINTER_VECTOR_TYPE(type, base,

Re: [Libguestfs] [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()

2023-02-22 Thread Eric Blake
On Wed, Feb 22, 2023 at 01:47:02AM +0100, Laszlo Ersek wrote: > On 2/21/23 20:32, Eric Blake wrote: > > On Tue, Feb 21, 2023 at 07:07:38PM +0100, Laszlo Ersek wrote: > > >> Well, given Daniel's comments meanwhile, it seems like the original > >> execvp() is something we shouldn't fret about. :/ >