[Libguestfs] [PATCH v2 5/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306).

Richard W.M. Jones rjones at redhat.com
Tue Sep 12 13:15:47 UTC 2017


On Tue, Sep 12, 2017 at 03:05:58PM +0200, Pino Toscano wrote:
> On Tuesday, 12 September 2017 14:29:16 CEST Richard W.M. Jones wrote:
> > @@ -255,11 +256,13 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data,
> >    }
> >    else {
> >      /* Writable qcow2 overlay on top of read-only drive. */
> > -    append_list_format ("file=%s", drv->overlay);
> > +    append_list_format ("file.file.filename=%s", drv->overlay);
> > +    append_list ("file.driver=qcow2");
> >      append_list ("cache=unsafe");
> > -    append_list ("format=qcow2");
> >      if (drv->disk_label)
> >        append_list_format ("serial=%s", drv->disk_label);
> > +    if (data->qemu_mandatory_locking)
> > +      append_list ("file.backing.file.locking=off");
> >    }
> 
> The same ought to be done for the appliance drive too.

I don't think it's necessary since we use snapshot=on for the
appliance drive.  I'd rather allow qemu to handle the locking there
(plus, it appears to work).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list