[PATCH 1/3] qemuBackupPrepare: Actually allow 'VIR_STORAGE_NET_HOST_TRANS_FD'

Peter Krempa via Devel posted 3 patches 3 months, 3 weeks ago
[PATCH 1/3] qemuBackupPrepare: Actually allow 'VIR_STORAGE_NET_HOST_TRANS_FD'
Posted by Peter Krempa via Devel 3 months, 3 weeks ago
From: Peter Krempa <pkrempa@redhat.com>

While I've actually implemented support for FD passing the NBD server
socket in eb768a556db I managed to misplace the hunk allowing the 'FD'
transport in the validation code, rendering the whole feature useless.

Fix the validation logic to make the feature useful.

Fixes: eb768a556db75040f7b518d198a18bd0f5d6faad
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_backup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index f6ee31dc2a..fb3558d280 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -86,8 +86,10 @@ qemuBackupPrepare(virDomainBackupDef *def)
             /* TODO: Do we need to mess with selinux? */
             break;

-        case VIR_STORAGE_NET_HOST_TRANS_RDMA:
         case VIR_STORAGE_NET_HOST_TRANS_FD:
+            break;
+
+        case VIR_STORAGE_NET_HOST_TRANS_RDMA:
         case VIR_STORAGE_NET_HOST_TRANS_LAST:
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("unexpected transport in <domainbackup>"));
-- 
2.49.0
Re: [PATCH 1/3] qemuBackupPrepare: Actually allow 'VIR_STORAGE_NET_HOST_TRANS_FD'
Posted by Ján Tomko via Devel 3 months, 3 weeks ago
On a Monday in 2025, Peter Krempa via Devel wrote:
>From: Peter Krempa <pkrempa@redhat.com>
>
>While I've actually implemented support for FD passing the NBD server
>socket in eb768a556db I managed to misplace the hunk allowing the 'FD'
>transport in the validation code, rendering the whole feature useless.
>
>Fix the validation logic to make the feature useful.

s/useful/usable/?

>
>Fixes: eb768a556db75040f7b518d198a18bd0f5d6faad

The commit that misplaced the case is:
commit ee49106dbf6f3c716f0e31c9ecc9bf528eb72bb2
     conf: Introduce VIR_STORAGE_NET_HOST_TRANS_FD

Not the one you mention (twice).

>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_backup.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
Re: [PATCH 1/3] qemuBackupPrepare: Actually allow 'VIR_STORAGE_NET_HOST_TRANS_FD'
Posted by Peter Krempa via Devel 3 months, 3 weeks ago
On Mon, May 19, 2025 at 18:37:03 +0200, Ján Tomko wrote:
> On a Monday in 2025, Peter Krempa via Devel wrote:
> > From: Peter Krempa <pkrempa@redhat.com>
> > 
> > While I've actually implemented support for FD passing the NBD server
> > socket in eb768a556db I managed to misplace the hunk allowing the 'FD'
> > transport in the validation code, rendering the whole feature useless.
> > 
> > Fix the validation logic to make the feature useful.
> 
> s/useful/usable/?
> 
> > 
> > Fixes: eb768a556db75040f7b518d198a18bd0f5d6faad
> 
> The commit that misplaced the case is:
> commit ee49106dbf6f3c716f0e31c9ecc9bf528eb72bb2
>     conf: Introduce VIR_STORAGE_NET_HOST_TRANS_FD
> 
> Not the one you mention (twice).

That commit placed it correctly (at that point in time) because the
implementation wasn't there. The commit I'm mentioning was supposed to
allow it (I mentioned "misplacing hunk allowing the 'FD' transport').


> 
> > Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> > ---
> > src/qemu/qemu_backup.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> 
> Reviewed-by: Ján Tomko <jtomko@redhat.com>
> 
> Jano