From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpbdq-00047X-9I for qemu-devel@nongnu.org; Tue, 24 Jan 2012 03:22:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpbdp-0006No-3M for qemu-devel@nongnu.org; Tue, 24 Jan 2012 03:22:10 -0500 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:48996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpbdo-0006Ni-GT for qemu-devel@nongnu.org; Tue, 24 Jan 2012 03:22:09 -0500 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jan 2012 08:07:14 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0O8HFoh3567698 for ; Tue, 24 Jan 2012 19:17:15 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0O8LsnN023800 for ; Tue, 24 Jan 2012 19:21:54 +1100 From: "M. Mohan Kumar" Date: Tue, 24 Jan 2012 13:51:51 +0530 References: <1326737500-11202-1-git-send-email-berrange@redhat.com> In-Reply-To: <1326737500-11202-1-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201201241351.51990.mohan@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH] Remove O_NOATIME flag from 9pfs open() calls in readonly mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, "Aneesh Kumar K.V" Acked-by: M. Mohan Kumar On Monday, January 16, 2012 11:41:40 PM Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When 2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 added support for > the 'readonly' flag against 9p filesystems, it also made QEMU > add the O_NOATIME flag as a side-effect. > > The O_NOATIME flag, however, may only be set by the file owner, > or a user with CAP_FOWNER capability. QEMU cannot assume that > this is the case for filesytems exported to QEMU. > > eg, run QEMU as non-root, and attempt to pass the host OS > filesystem through to the guest OS with readonly enable. > The result is that the guest OS cannot open any files at > all. > > If O_NOATIME is really required, it should be optionally > enabled via a separate QEMU command line flag. > > * hw/9pfs/virtio-9p.c: Remove O_NOATIME > > Signed-off-by: Daniel P. Berrange > --- > hw/9pfs/virtio-9p.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c > index e6ba6ba..f8e2c07 100644 > --- a/hw/9pfs/virtio-9p.c > +++ b/hw/9pfs/virtio-9p.c > @@ -1391,7 +1391,6 @@ static void v9fs_open(void *opaque) > err = -EROFS; > goto out; > } > - flags |= O_NOATIME; > } > err = v9fs_co_open(pdu, fidp, flags); > if (err < 0) {