qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] migration: Truncate state file in xen-save-devices-state


From: Anthony PERARD
Subject: Re: [PATCH] migration: Truncate state file in xen-save-devices-state
Date: Mon, 28 Sep 2020 17:46:18 +0100

On Mon, Sep 21, 2020 at 12:17:23PM +0100, Dr. David Alan Gilbert wrote:
> * Dov Murik (dovmurik@linux.vnet.ibm.com) wrote:
> > When running the xen-save-devices-state QMP command, if the filename
> > already exists it will be truncated before dumping the devices' state
> > into it.
> > 
> > Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
> > ---
> >  migration/savevm.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/migration/savevm.c b/migration/savevm.c
> > index 304d98ff78..e1b26672cc 100644
> > --- a/migration/savevm.c
> > +++ b/migration/savevm.c
> > @@ -2803,7 +2803,8 @@ void qmp_xen_save_devices_state(const char *filename, 
> > bool has_live, bool live,
> >      vm_stop(RUN_STATE_SAVE_VM);
> >      global_state_store_running();
> >  
> > -    ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, 
> > errp);
> > +    ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT | O_TRUNC,
> > +                                    0660, errp);
> >      if (!ioc) {
> >          goto the_end;
> >      }

Hi Marek,

Do you know if the above patch is going to work in a linux stubdomain?
Can we truncate the "save file" which seems to be stubdomain's console 1?

Cheers,

-- 
Anthony PERARD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]