|
From: | Alex Bligh |
Subject: | Re: [Qemu-devel] [PATCH 2/2] osdep: warn if open(O_DIRECT) on fails with EINVAL |
Date: | Thu, 22 Aug 2013 20:31:25 +0100 |
--On 22 August 2013 11:57:56 -0600 Eric Blake <address@hidden> wrote:
# define O_DIRECT 0 so that the rest of the code can just blindly use open(...,|O_DIRECT) (provided, of course, that not having O_DIRECT semantics is not fatal...). If that is done, then this #ifdef will always be true...
I think this is undesirable as the result of opening without O_DIRECT when you really wanted O_DIRECT could be subtle data corruption due to unexpected caching. Is an error not more appropriate here than proceeding regardless? -- Alex Bligh
[Prev in Thread] | Current Thread | [Next in Thread] |