On 04/18/2012 03:37 AM, Wen Congyang wrote: >>> 2. This command doesn't support the fd that is is associated with a pipe, >>> socket, or FIFO(lseek will fail with such fd). >> >> How hard would it be to lift that restriction ? When libvirt does save to >> file, or core dump these days, we tend to pass a pipe FD to QEMU, which >> is connected to libvirt's I/O helper process. The reason for this is that >> it lets us turn on O_DIRECT for the dumped data, which has proved to be >> quite an important feature for oVirt. So I'd rather like to keep that >> ability with the new dump command. > > The reason is that we will use lseek(fd, ...). If you pass a pipe FD > to qemu, lseek() will fail. I donot know the note size before we > write it to the core, so I use lseek()...
The question, then, is why we don't know the note size in advance, and what it would take to be able to compute it in advance so that the output file can be written in a single pass without needing lseek(). -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature