On Wed, Jun 13, 2018 at 03:18:02PM +0100, Radostin Stoyanov wrote: > > Ideally qemu-nbd would automatically exit when the last use of /dev/nbdNNN > > was release (ie when filesystem was unmounted). This is something you can > > enable for loopback devices, but I'm not sure it works for NBD. THis would > > be a useful kernel enhancement if someone feels adventurous. > It seems like qemu-nbd terminates automatically when the last client > disconnects. Right, but in the case where the kernel has connected qemu-nbd to a block device, the kernel itself is a client that won't exit. So what I was describing was that the kernel should automatically delete the /dev/ndb0 device when the last mount was unmounted, and thus in turn it can close the last client of qemu-nbd > > https://git.qemu.org/?p=qemu.git;a=blob;f=qemu-nbd.c;h=51b9d38c72732c821cb4ee5bf362533406ce2494;hb=HEAD#l341 > > I will send a patch thattakes qemu-nbd out of the cgroups and > disconnects qemu-nbd on container shutdown. > > Radostin > 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list