On 08/21/2013 07:16 AM, Stefan Hajnoczi wrote:
> Print a warning when opening a file O_DIRECT on tmpfs fails.  This saves
> users a lot of time trying to figure out the EINVAL error.
> 
> Daniel P. Berrange <berra...@redhat.com> suggested opening the file
> without O_DIRECT as a portable way to check whether the file system
> supports O_DIRECT.  That gets messy when flags contains O_CREAT since
> we'd create a file but return an error - or a race condition if we try
> to unlink the file.  It's simpler to check the file system type.
> 
> Reported-by: Deepak C Shetty <deepa...@linux.vnet.ibm.com>
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
>  util/osdep.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to