qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev
@ 2014-11-20 12:44 Max Reitz
  2014-11-20 12:44 ` [Qemu-devel] [PATCH 1/3] " Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Max Reitz @ 2014-11-20 12:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Peter Lieven, Markus Armbruster, Luiz Capitulino,
	Stefan Hajnoczi, Max Reitz

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-12-02 18:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 12:44 [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev Max Reitz
2014-11-20 12:44 ` [Qemu-devel] [PATCH 1/3] " 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

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).