Received: from eggs.gnu.org ([2001:4830:134:3::10]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMI6K-0000uL-67 for qemu-devel@nongnu.org; Wed, 18 Sep 2013 09:47:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMI6D-0003TN-8T for qemu-devel@nongnu.org; Wed, 18 Sep 2013 09:47:28 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:35977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMI6D-0003Sw-1Y for qemu-devel@nongnu.org; Wed, 18 Sep 2013 09:47:21 -0400 Received: by mail-ea0-f175.google.com with SMTP id m14so3430032eaj.20 for ; Wed, 18 Sep 2013 06:47:20 -0700 (PDT) Date: Wed, 18 Sep 2013 15:47:17 +0200 From: Stefan Hajnoczi Message-ID: <20130918134717.GB25444@stefanha-thinkpad.redhat.com> References: <1377163743-25029-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377163743-25029-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] osdep: warn if open(O_DIRECT) on fails with EINVAL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Deepak C Shetty , qemu-devel@nongnu.org, Markus Armbruster On Thu, Aug 22, 2013 at 11:29:01AM +0200, Stefan Hajnoczi wrote: > After trying out a few approaches, here is what I think is the simplest viable > way to print a user-friendly warning if opening a file O_DIRECT fails with > EINVAL. This happens on Linux tmpfs. > > We don't really know why we got EINVAL but if O_DIRECT was used it's a good > clue that the file system does not support O_DIRECT. > > Stefan Hajnoczi (2): > libcacard: link against qemu-error.o for error_report() > osdep: warn if open(O_DIRECT) on fails with EINVAL > > libcacard/Makefile | 3 ++- > util/osdep.c | 7 +++++++ > 2 files changed, 9 insertions(+), 1 deletion(-) Applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan