[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] osdep: warn if opening a file O_DIRECT o
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] osdep: warn if opening a file O_DIRECT on tmpfs fails |
Date: |
Wed, 21 Aug 2013 09:13:47 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
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 <address@hidden> 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 <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> util/osdep.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature