All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] Re: RFC: blockdev_add & friends, brief rationale, QMP docs
Date: Sun, 30 May 2010 12:09:45 +0300	[thread overview]
Message-ID: <4C022B59.80109@redhat.com> (raw)
In-Reply-To: <m34ohryjib.fsf@blackfin.pond.sub.org>

On 05/28/2010 09:21 PM, Markus Armbruster wrote:

<snip, agreed>

> Summary of the host / guest split:
>
> -drive options                      host or guest?
> bus, unit, if, index, addr          guest, already covered by qdev
> cyls, heads, secs, trans            guest, new qdev properties
>                                        (but defaults depend on image)
> media                               guest
> snapshot, file, cache, aio, format  host, blockdev_add options
>    

We expose some of the cache property to the guest.  IMO we need the 
cache property to be both guest and host, with qemu bridging the 
impedance mismatch if needed.

> rerror, werror                      host, guest drivers will reject
>                                        values they don't support
>    

Did you mean 'block format drivers will reject'?

> serial                              guest, new qdev properties
> readonly                            both host&  guest, qdev will refuse
>                                        to connect readonly host to read/
>                                        write guest
>
> QMP command docs:
>
> blockdev_add
> ------------
>
> Add host block device.
>
> Arguments:
>
> - "id": the host block device's ID, must be unique (json-string)
>    

Unique in which namespace?  A global ID namespace if fine.

> - "file": the disk image file to use (json-string, optional)
> - "format": disk format (json-string, optional)
>      - Possible values: "raw", "qcow2", ...
>    

Need some way to list supported formats.

> - "aio": host AIO (json-string, optional)
>      - Possible values: "threads" (default), "native"
>    

Need some way to list supported options.

> - "cache": host cache usage (json-string, optional)
>      - Possible values: "writethrough" (default), "writeback", "unsafe",
>                         "none"
>    

...

> - "readonly": open image read-only (json-bool, optional, default false)
> - "rerror": what to do on read error (json-string, optional)
>      - Possible values: "report" (default), "ignore", "stop"
>    

...

> - "werror": what to do on write error (json-string, optional)
>      - Possible values: "enospc" (default), "report", "ignore", "stop"
>    

...
> - "snapshot": enable snapshot (json-bool, optional, default false)
>
>    

An alternative to the "Need some way to list *" is to provide another 
query capability, akin to KVM_CAP_..., but I think listing is superior.

> Example:
>
> ->  { "execute": "blockdev_add",
>               "arguments": { "format": "raw", "id": "blk1",
>                              "file": "fedora.img" } }
> <- { "return": {} }
>
> Notes:
>
> (1) If argument "file" is missing, all other optional arguments must be
>      missing as well.  This defines a block device with no media
>      inserted.
>
> (2) It's possible to list supported disk formats by running QEMU with
>      arguments "-blockdev_add \?".
>    

Ok, so there's a partial answer here.

> blockdev_change
> ---------------
>
> Change host block device media.
>
> Arguments are exactly like blockdev_add.
>
> Notes:
>
> (1) If argument "file" is missing, all other optional arguments must be
>      missing as well.  This ejects the media without inserting a new one.
>    

Maybe we want an explicit blockdev_eject instead, not sure.

-- 
error compiling committee.c: too many arguments to function

  parent reply	other threads:[~2010-05-30  9:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28 18:21 [Qemu-devel] RFC: blockdev_add & friends, brief rationale, QMP docs Markus Armbruster
2010-05-28 19:13 ` [Qemu-devel] " Kevin Wolf
2010-05-28 19:17   ` Anthony Liguori
2010-05-28 19:24     ` Luiz Capitulino
2010-05-30  9:11       ` Avi Kivity
2010-05-31 11:05         ` Markus Armbruster
2010-05-31 13:48           ` Luiz Capitulino
2010-05-31 14:04             ` Kevin Wolf
2010-05-30  9:09 ` Avi Kivity [this message]
2010-05-31 10:54   ` Markus Armbruster
2010-05-31 11:23     ` Avi Kivity
2010-05-31 11:50       ` Markus Armbruster
2010-06-04 14:16 ` Markus Armbruster
2010-06-04 14:32   ` Kevin Wolf
2010-06-04 15:53     ` Markus Armbruster
2010-06-04 16:20       ` Kevin Wolf
2010-06-06  8:23   ` Avi Kivity
2010-06-08  9:41     ` 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=4C022B59.80109@redhat.com \
    --to=avi@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.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.