From: Max Reitz <mreitz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Cc: Peter Lieven <pl@kamp.de>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev
Date: Tue, 02 Dec 2014 10:16:06 +0100 [thread overview]
Message-ID: <547D8356.1090106@redhat.com> (raw)
In-Reply-To: <877fyf1gbu.fsf@blackfin.pond.sub.org>
On 2014-11-28 at 16:43, Markus Armbruster wrote:
> Kevin Wolf <kwolf@redhat.com> writes:
>
>> Am 20.11.2014 um 13:44 hat Max Reitz geschrieben:
>>> 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.
>> Not sure if 'auto' is worth implementing (it's a typical HMP default
>> action that no QMP client would use, except that it isn't even the
>> default for HMP), but the implementation looks correct at least.
> QMP eschews magic. I'd prefer to keep 'auto' out.
>
> HMP can offer it regardless, if it's useful. But I doubt it will be.
> Few users will need to control this, and fewer will realize they can by
> giving an extra argument.
Well, Kevin made the good point of the user generally knowing whether a
file should be written to or not. Furthermore, I don't think it would be
too hard to use rw, then see that access was denied, and then use ro,
manually. Maybe that's even better than auto, somehow.
Max
> I wish I could tell you to leave change alone because it's a legacy
> dungpile. Alas, it's still only a dungpile. I hope we can create a set
> of sane media control commands relatively soon now.
next prev parent reply other threads:[~2014-12-02 9:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=547D8356.1090106@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).