From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
Markus Armbruster <armbru@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev
Date: Thu, 20 Nov 2014 13:44:45 +0100 [thread overview]
Message-ID: <1416487488-8423-1-git-send-email-mreitz@redhat.com> (raw)
The 'change' QMP and HMP command allows replacing the medium in drives
which support this, e.g. floppy disk drives. For some drives, the medium
carries information about whether it can be written to or not (again,
floppy drives). Therefore, it should be possible to change the read-only
state of block devices when changing the loaded medium.
This series adds an optional additional parameter to the 'change' QMP
and HMP command which allows changing the read-only state in four ways:
- 'retain': Just keep the status as it was before; this is the current
behavior and thus this will be the default.
- 'ro': Force read-only access
- 'rw': Force writable access
- 'auto': This opens the new file R/W first, if that fails, the file is
opened read-only.
Max Reitz (3):
blockdev: Add read-only option to change-blockdev
qmp: Expose read-only option for 'change'
hmp: Expose read-only option for 'change'
blockdev.c | 41 ++++++++++++++++++++++++++++++++++++++---
hmp-commands.hx | 24 +++++++++++++++++++++---
hmp.c | 17 ++++++++++++++++-
include/sysemu/blockdev.h | 3 ++-
qapi-schema.json | 27 ++++++++++++++++++++++++++-
qmp-commands.hx | 24 +++++++++++++++++++++++-
qmp.c | 14 ++++++++++++--
7 files changed, 138 insertions(+), 12 deletions(-)
--
1.9.3
next reply other threads:[~2014-11-20 12:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 12:44 Max Reitz [this message]
2014-11-20 12:44 ` [Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev Max Reitz
2014-11-26 16:24 ` Eric Blake
2014-11-26 16:36 ` Max Reitz
2014-11-26 16:46 ` Eric Blake
2014-11-20 12:44 ` [Qemu-devel] [PATCH 2/3] qmp: Expose read-only option for 'change' Max Reitz
2014-11-26 16:33 ` Eric Blake
2014-11-20 12:44 ` [Qemu-devel] [PATCH 3/3] hmp: " Max Reitz
2014-11-26 16:35 ` Eric Blake
2014-11-26 16:17 ` [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev Kevin Wolf
2014-11-28 15:43 ` Markus Armbruster
2014-12-02 9:16 ` Max Reitz
2014-12-02 18:22 ` Markus Armbruster
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=1416487488-8423-1-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).