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

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



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().

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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