[libvirt] [PATCH 8/9] wip: start virtiofsd

Daniel P. Berrangé berrange at redhat.com
Fri Nov 22 17:09:31 UTC 2019


On Mon, Nov 04, 2019 at 10:06:40AM +0100, Stefan Hajnoczi wrote:
> On Fri, Nov 1, 2019 at 1:18 PM Ján Tomko <jtomko at redhat.com> wrote:
> > +    if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def) < 0)
> > +        goto cleanup;
> > +    fd = qemuOpenChrChardevUNIXSocket(chrdev);
> > +    if (fd < 0)
> > +        goto cleanup;
> > +    if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0)
> > +        goto cleanup;
> 
> qemuSecurityClearSocketLabel() is not called in the
> qemuOpenChrChardevUNIXSocket() error code path.  Is this correct?
> 
> > +static void
> > +qemuExtVirtioFSdStop(virQEMUDriverPtr driver,
> > +                     virDomainObjPtr vm,
> > +                     virDomainFSDefPtr fs)
> > +{
> 
> The daemon stops automatically when the vhost-user socket is closed by
> QEMU.  Is it necessary to implement an explicit stop function?

That's good, but we've generally wanted to be explicit about cleaning
things up to cope with unexpected circumstances. In particular QEMU
can get itself stuck as a zombie if there's a dead disk, so it is
worth tearing down virtiofsd explicitly.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list