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

Re: [Libguestfs] [PREVIEW ONLY] Refactor data transfer code



On Wed, Sep 22, 2010 at 09:36:41AM +0100, Matthew Booth wrote:
> On 21/09/10 20:12, Richard W.M. Jones wrote:
> >
> >This patch is not using hread/hwrite?
> 
> No. That will be required for changing formats, but not for a straight copy.
> 
> >Anyway I'd be interested in whether you can do all you wanted from
> >hread/hwrite/hseek/etc using the proposed upload-offset API that I
> >posted here:
> >
> >http://www.redhat.com/archives/libguestfs/2010-September/msg00026.html
> >http://www.redhat.com/archives/libguestfs/2010-September/msg00027.html
> 
> No, because the API requires passing in a file, which I don't have.

This is not true.  You can write from anything that you can get into a
file descriptor, by specifying "/dev/fd/NN" as the filename.

However the API does require that the source of the data comes from a
separate thread or process, which is not how virt-v2v works at the
moment.

I suspect you need to just use pwrite.  AFAICT it already does
everything you need.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


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