From: Oleg Nesterov <oleg@redhat.com>
To: Andre Przywara <andre.przywara@arm.com>,
Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>,
Sasha Levin <sasha.levin@oracle.com>,
Pekka Enberg <penberg@kernel.org>,
Will Deacon <will.deacon@arm.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH 2/3] kvmtool/run: don't abuse "root=" parameter, don't pass "rw" to v9fs_mount()
Date: Thu, 22 Oct 2015 17:59:42 +0200 [thread overview]
Message-ID: <20151022155942.GA15548@redhat.com> (raw)
In-Reply-To: <20151022155921.GA15527@redhat.com>
1. kvm_cmd_run_init() appends "root=/dev/root" to real_cmdline if
cfg.using_rootfs == T. This doesn't hurt but makes no sense and
looks confusing.
We do not need to initialiaze the kernel's saved_root_name[] and
"/dev/root" means nothing to name_to_dev_t().
We only need to pass this mount-tag to 9p but the kernel always
uses dev_name="/dev/root" in mount_root() path, so we can safely
remove this option from the command line.
2. "rw" in rootflags looks confusing too, it is silently ignored by
v9fs_parse_options() and has no effect.
We need to clear MS_RDONLY from root_mountflags, this is what the
"standalone" kernel parameter correctly does.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
builtin-run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin-run.c b/builtin-run.c
index ab1fc2a..6e4491c 100644
--- a/builtin-run.c
+++ b/builtin-run.c
@@ -590,7 +590,7 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
}
if (kvm->cfg.using_rootfs) {
- strcat(real_cmdline, " root=/dev/root rw rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p");
+ strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L rootfstype=9p");
if (kvm->cfg.custom_rootfs) {
kvm_run_set_sandbox(kvm);
--
2.4.3
next prev parent reply other threads:[~2015-10-22 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 15:59 [PATCH 0/3] kvmtool: don't overwrite /virt/init Oleg Nesterov
2015-10-22 15:59 ` [PATCH 1/3] kvmtool: add lkvm-static to gitignore Oleg Nesterov
2015-10-22 15:59 ` Oleg Nesterov [this message]
2015-10-22 15:59 ` [PATCH 3/3] kvmtool/run: do not overwrite /virt/init Oleg Nesterov
2015-10-27 17:06 ` [PATCH 0/3] kvmtool: don't " Will Deacon
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=20151022155942.GA15548@redhat.com \
--to=oleg@redhat.com \
--cc=andre.przywara@arm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=sasha.levin@oracle.com \
--cc=will.deacon@arm.com \
/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.