Re: [PATCH v2 6/8] virFDStream: Add option for delete file after it's opening

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

 



On Tue, Apr 05, 2011 at 10:55:40AM -0600, Eric Blake wrote:
> On 04/05/2011 10:12 AM, Michal Privoznik wrote:
> > This is needed if we want to transfer a temporary file. If the
> > transfer is done with iohelper, we might run into a race condition,
> > where we unlink() file before iohelper is executed.
> > 
> > * src/fdstream.c, src/fdstream.h,
> >   src/util/iohelper.c: Add new option
> > * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c,
> >   src/storage/storage_driver.c, src/uml/uml_driver.c,
> >   src/xen/xen_driver.c: Expand existing function calls
> 
> I'm not convinced about this commit.  We should instead be fixing
> iohelper to receive its file by fd inheritance, so that it doesn't have
> to open() in the first place.  Then you don't need iohelper to worry
> about unlink().

My intention was that iohelper could also do uid/gid changes
in the future to cope with opening files on root squashing
NFS. For that we'd want it to be doing the open, not libvirtd

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]