From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "M. Mohan Kumar" <mohan@in.ibm.com>
Subject: [Qemu-devel] [PATCH] Remove O_NOATIME flag from 9pfs open() calls in readonly mode
Date: Mon, 16 Jan 2012 18:11:40 +0000 [thread overview]
Message-ID: <1326737500-11202-1-git-send-email-berrange@redhat.com> (raw)
From: "Daniel P. Berrange" <berrange@redhat.com>
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 <berrange@redhat.com>
---
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) {
--
1.7.7.5
next reply other threads:[~2012-01-16 18:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 18:11 Daniel P. Berrange [this message]
2012-01-23 18:32 ` [Qemu-devel] [PATCH] Remove O_NOATIME flag from 9pfs open() calls in readonly mode Daniel P. Berrange
2012-01-24 8:21 ` M. Mohan Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326737500-11202-1-git-send-email-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=mohan@in.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.