On 07/19/2011 11:45 AM, Daniel P. Berrange wrote:
On Thu, Jul 14, 2011 at 08:24:34AM -0600, Eric Blake wrote:
> O_DIRECT has stringent requirements - I/O must occur with buffers
> that have both alignment and size as multiples of the file system
> block size (used to be 512 bytes, but these days, 4k is safer, and
> 64k allows for better throughput). Rather than make lots of changes
> at each site that wants to use O_DIRECT, it is easier to offload
> the work through a helper process that mirrors the I/O between a
> pipe and the actual direct fd, so that the other end of the pipe
> no longer has to worry about constraints.
>
> +++ b/src/libvirt_private.syms
> @@ -1085,6 +1085,12 @@ virAuditOpen;
> virAuditSend;
>
>
> +# virdirect.h
> +virDirectFdClose;
> +virDirectFdFree;
> +virDirectFdNew;
The principle all seems fine, but I'm wondering about the naming of
this. Also perhaps we could put this in the files.h module ? It would
be nice to eventually move all virFile named APIs into there and perhaps
even rename it to virfile.{c,h}
Sure, will do that on my v2 respin.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org