Re: [Libguestfs] [PATCH nbdkit 2/2] file: Allow a file descriptor to be passed to the plugin

2022-08-18 Thread Eric Blake
On Thu, Aug 18, 2022 at 04:36:13PM +0100, Richard W.M. Jones wrote: > This is what I pushed - how does it look? I ignored the cases we > cannot deal with, except O_WRONLY where I emit a debug message but > continue: > > https://gitlab.com/nbdkit/nbdkit/-/blob/master/plugins/file/file.c#L572 > >

Re: [Libguestfs] [PATCH nbdkit 2/2] file: Allow a file descriptor to be passed to the plugin

2022-08-18 Thread Richard W.M. Jones
On Thu, Aug 18, 2022 at 10:28:17AM -0500, Eric Blake wrote: > On Wed, Aug 17, 2022 at 10:56:58PM +0100, Richard W.M. Jones wrote: > > On Wed, Aug 17, 2022 at 10:37:00PM +0100, Richard W.M. Jones wrote: > > > Is that actually possible? “fcntl (fd, F_GETFL) & O_WRONLY” > > > should do it? > > > >

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Eric Blake
On Thu, Aug 18, 2022 at 12:30:21PM +0200, Laszlo Ersek wrote: > On 08/18/22 11:53, Richard W.M. Jones wrote: > > > > This is upstream in 5 commits 5764fa6f4..dd28b0054: > > > > https://gitlab.com/nbdkit/nbdkit/-/commit/2620d95a4585204f0db0d55c0d41276d11970436 > >

Re: [Libguestfs] [PATCH nbdkit 2/2] file: Allow a file descriptor to be passed to the plugin

2022-08-18 Thread Eric Blake
On Wed, Aug 17, 2022 at 10:56:58PM +0100, Richard W.M. Jones wrote: > On Wed, Aug 17, 2022 at 10:37:00PM +0100, Richard W.M. Jones wrote: > > Is that actually possible? “fcntl (fd, F_GETFL) & O_WRONLY” > > should do it? > > So the answer is no as it's a kind of tri-state. More like 5-state (by

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Eric Blake
On Thu, Aug 18, 2022 at 10:27:11AM +0200, Laszlo Ersek wrote: > > @@ -180,14 +181,23 @@ file_config (const char *key, const char *value) > > * existence checks to the last possible moment. > > */ > >if (strcmp (key, "file") == 0) { > > -free (filename); > > +if (mode !=

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Richard W.M. Jones
On Thu, Aug 18, 2022 at 12:30:21PM +0200, Laszlo Ersek wrote: > On 08/18/22 11:53, Richard W.M. Jones wrote: > > > > This is upstream in 5 commits 5764fa6f4..dd28b0054: > > > > https://gitlab.com/nbdkit/nbdkit/-/commit/2620d95a4585204f0db0d55c0d41276d11970436 > >

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Laszlo Ersek
On 08/18/22 11:53, Richard W.M. Jones wrote: > > This is upstream in 5 commits 5764fa6f4..dd28b0054: > > https://gitlab.com/nbdkit/nbdkit/-/commit/2620d95a4585204f0db0d55c0d41276d11970436 > https://gitlab.com/nbdkit/nbdkit/-/commit/185e7d4010b353f36b5ca5d47467a770c530e58c >

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Richard W.M. Jones
This is upstream in 5 commits 5764fa6f4..dd28b0054: https://gitlab.com/nbdkit/nbdkit/-/commit/2620d95a4585204f0db0d55c0d41276d11970436 https://gitlab.com/nbdkit/nbdkit/-/commit/185e7d4010b353f36b5ca5d47467a770c530e58c

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Laszlo Ersek
On 08/18/22 11:32, Richard W.M. Jones wrote: > On Thu, Aug 18, 2022 at 10:27:11AM +0200, Laszlo Ersek wrote: >> On 08/17/22 17:38, Richard W.M. Jones wrote: >>> Previously we relied on the implicit assumption filename xor directory, >>> representing two modes. Make this explicit with an internal

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Richard W.M. Jones
On Thu, Aug 18, 2022 at 10:27:11AM +0200, Laszlo Ersek wrote: > On 08/17/22 17:38, Richard W.M. Jones wrote: > > Previously we relied on the implicit assumption filename xor directory, > > representing two modes. Make this explicit with an internal mode > > variable. > > > > This is just

Re: [Libguestfs] [v2v PATCH] convert_linux: start the QEMU guest agent in a distro-specific way

2022-08-18 Thread Laszlo Ersek
On 08/18/22 07:48, Laszlo Ersek wrote: > Thanks; I'll go ahead and merge it, and backport it too, in order to let > QE start testing it soon. master: ad2b4f2e5095 rhel-9.1 (retested with rhel-6.10 and rhel-7.9 domains): 7dd396af54df ___ Libguestfs

Re: [Libguestfs] [PATCH nbdkit 1/2] file: Add an internal "mode"

2022-08-18 Thread Laszlo Ersek
On 08/17/22 17:38, Richard W.M. Jones wrote: > Previously we relied on the implicit assumption filename xor directory, > representing two modes. Make this explicit with an internal mode > variable. > > This is just refactoring and should not change the functionality. > However we're now more

Re: [Libguestfs] [PATCH nbdkit 2/2] file: Allow a file descriptor to be passed to the plugin

2022-08-18 Thread Laszlo Ersek
On 08/17/22 23:56, Richard W.M. Jones wrote: > On Wed, Aug 17, 2022 at 10:37:00PM +0100, Richard W.M. Jones wrote: >> Is that actually possible? “fcntl (fd, F_GETFL) & O_WRONLY” >> should do it? > > So the answer is no as it's a kind of tri-state. > > I think this should work (untested)? > >