[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/2] monitor openfd commands
From: |
Eric Blake |
Subject: |
Re: [PATCH 0/2] monitor openfd commands |
Date: |
Thu, 11 Jun 2020 09:31:50 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/11/20 6:17 AM, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
The monitors currently have a 'getfd' command that lets you pass an fd
via the monitor socket. 'openfd' is a new command that opens a file
and puts the fd in the same fd pool. The file is opened RW and created
if it doesn't exist.
It makes it easy to test migration to and from a file.
We have two fd-passing mechanisms: getfd and add-fd. add-fd is newer,
and allows things like /dev/fdset/NNN to work anywhere a filename works.
I'm guessing that the issue here is that migration hasn't been tweaked
to work nicely with the newer add-fd, but instead insists on the older
getfd interface (where you have to use getfd to associate an fd with a
name, then tell migration to use that special name, but the special name
is via a different parameter than the normal filename parameter). At
which point openfd looks like it is just sugar to make getfd easier to use.
Would it instead be worth modifying migration to work with add-fd? Or
does add-fd need the same sort of sugar?
Dr. David Alan Gilbert (2):
qmp: Add 'openfd' command
hmp: Add 'openfd' command
hmp-commands.hx | 16 +++++++++++++-
include/monitor/hmp.h | 1 +
monitor/hmp-cmds.c | 10 +++++++++
monitor/misc.c | 48 +++++++++++++++++++++++++++++++++---------
qapi/misc.json | 23 +++++++++++++++++++-
tests/qtest/test-hmp.c | 2 ++
6 files changed, 88 insertions(+), 12 deletions(-)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org