[libvirt] [PATCH 5/8] save: let iohelper handle inherited fd

Daniel P. Berrange berrange at redhat.com
Tue Jul 19 16:16:28 UTC 2011


On Thu, Jul 14, 2011 at 08:24:32AM -0600, Eric Blake wrote:
> Rather than making the iohelper subject to a race in reopening
> the file, it is nicer to pass an already-open fd by inheritance.
> 
> The old synopsis form must continue to work - if someone updates
> their libvirt package and installs a new libvirt_iohelper but
> without restarting the old libvirtd daemon, then the daemon can
> still make calls using the old syntax but the new iohelper.
> 
> * src/util/iohelper.c (runIO): Split code for open...
> (prepare): ...to new function.
> (usage): Update synopsis.
> (main): Allow alternate calling form.
> * src/fdstream.c (virFDStreamOpenFileInternal): Use alternate form.
> ---
>  src/fdstream.c      |   32 ++++--------
>  src/util/iohelper.c |  142 +++++++++++++++++++++++++++++++++++---------------
>  2 files changed, 110 insertions(+), 64 deletions(-)

ACK

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 :|




More information about the libvir-list mailing list