qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name
Date: Wed, 3 Dec 2014 13:52:16 +0800	[thread overview]
Message-ID: <20141203055144.GA1179@ad.nay.redhat.com> (raw)
In-Reply-To: <87vbltvpl0.fsf@blackfin.pond.sub.org>

On Tue, 12/02 20:06, Markus Armbruster wrote:
> == block-core.json ==
> 
> * block-commit
> 
>   @device names a backend, @top and @base each name one of its nodes via
>   file name matching.
> 
>   TODO: support specifying the two nodes via node name.
> 
>   Why do we need @device when a top node is specified?
> 
>   * We currently need the backend to set op blockers, and finding a
>     node's backend isn't easy.  Implementation detail shows through the
>     interface, blech.
> 
>   * We need to know whether the top node is the active layer.
> 
>     Complication: if it's shared by multiple backends, it may be the
>     active layer in one but not the other.  Specifying the backend
>     resolves the ambiguity.  Whether that makes sense I don't know.
> 
> * block-stream
> 
>   @device names a backend, @base names a node via file name matching.
> 
>   TODO: support specifying the node via node name.
> 
>   I think backend is inappropriate here, we should support streaming up
>   to a node, just like block-commit supports committing down from a
>   node.

Agreed.

> 
> * block_passwd
> * block_resize
> 
>   @node-name names a node.
> 
>   @device names a backend, and references its root node, for
>   compatibility.
> 
>   Either @device or @node-name must be given.
> 
>   TODO: should have single mandatory parameter instead of two optionals.
> 
> * blockdev-snapshot-sync
> 
>   @node-name and @device as for block_passwd, including TODO.
> 
>   @snapshot-node-name defines the new node's node name.
> 
> * block_set_io_throttle
> 
>   @device names a backend.
> 
>   TODO: support nodes.
> 
>   Note: we'd like to redo throttling as a block filter node, so maybe
>   we'll have a completely different command instead.

Whether it's implemented in core block layer or as a block filter node is
implementation detail from user's PoV, so it shouldn't matter unless we use a
"general" block filter configuration command.

> 
> * blockdev-add
> 
>   This command defines a backend and its node tree, where sub-trees may
>   be references to existing nodes.
> 
>   @id defines the backend's name.
> 
>   @node-name defines its root node's node name.
> 
>   Note: blockdev-add always defines a backend.  When you build up a
>   backend bottom-up with several commands, you get a bunch of unwanted
>   backends "in the middle".  I'd like to make @id optional, and omit the
>   backend when it's missing.
> 
> * change-backing-file
> 
>   @device names a backend, @image-node-name names a node.
> 
>   As far as I can tell, we need the backend only to set op blockers.
>   Implementation detail shows through the interface.
> 
> * drive-backup
> 
>   @device names a backend.
> 
>   Do we want to be able to back up any node, or only a backend?
> 
>   Note: documentation of @target sounds like it could somehow name a
>   backend, but as far as I can tell it's always interpreted as file
>   name.
> 
> * drive-mirror
> 
>   @device names a backend, @replaces names a node, and @node-name
>   defines the name of the new node.
> 
>   Do we want to be able to mirror any node, or only a backend?
> 
>   Note: documentation of @target sounds like it could somehow name a
>   backend, but as far as I can tell it's always interpreted as file
>   name.
> 
>   Note: drive-mirror supports @replaces, but drive-backup doesn't.  Odd.

It's only asymmetric, not odd: @target has the same data in drive-mirror, so
"replaces" doesn't surprise @device's user. That's not true for drive-backup.

> * query-blockstats
> 
>   Returns some stats for all backends as array of BlockStats.
>   BlockStats member @device is the backend name.  Member @stats contains
>   the stats for the backend's root node.  Member @parent is BlockStats
>   for the child node that is stored in BDS member file.  Member @backing
>   is BlockStats for the chold node that is stored in BDS member
>   backing_hd.  Stats for other children aren't returned.
> 
>   TODO: generalize this to the full tree, include node names.
> 
> * query-block-jobs
> 
>   Returns information on block jobs as array of BlockJobInfo.  A block
>   job is always tied to a backend, and BlockJobInfo member @device is
>   its name.
> 
>   The question whether we need a node name here is moot; see
>   block-job-cancel above.
> 

We are not internally ready to untie block job from backend yet, once we get
there, we should start giving names to block jobs, add support some kind of
default naming/querying to be backward compatible.

Fam

  reply	other threads:[~2014-12-03  5:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 19:06 [Qemu-devel] Review of monitor commands identifying BDS / BB by name Markus Armbruster
2014-12-03  5:52 ` Fam Zheng [this message]
2014-12-03 11:13   ` Paolo Bonzini
2014-12-04 15:59   ` Markus Armbruster
2014-12-03 10:30 ` Kevin Wolf
2014-12-03 13:59   ` Eric Blake
2014-12-03 14:51     ` Markus Armbruster
2014-12-04 16:56       ` Markus Armbruster
2014-12-04 15:56   ` Markus Armbruster
2014-12-04 19:44     ` Eric Blake
2014-12-05  9:19       ` Kevin Wolf
2014-12-05 12:19         ` Markus Armbruster
2014-12-05  9:34       ` Markus Armbruster
2014-12-05  9:46         ` Kevin Wolf
2014-12-05 12:08           ` Markus Armbruster
2014-12-16 18:12 ` [Qemu-devel] Can we make monitor commands identify BDS / BB by name consistently? (was: Review of monitor commands identifying BDS / BB by name) Markus Armbruster
2014-12-17 14:12   ` Kevin Wolf
2014-12-17 16:17     ` [Qemu-devel] Can we make monitor commands identify BDS / BB by name consistently? Markus Armbruster
2014-12-19 18:27   ` Markus Armbruster
2014-12-18 15:25 ` [Qemu-devel] Review of ways to create BDSes (was: Review of monitor commands identifying BDS / BB by name) Markus Armbruster
2014-12-19 12:18   ` Kevin Wolf
2014-12-19 14:02     ` [Qemu-devel] Review of ways to create BDSes Markus Armbruster
2014-12-19 14:24   ` Markus Armbruster
2014-12-19 15:52 ` [Qemu-devel] Review of ways to reopen BDSes (was: Review of monitor commands identifying BDS / BB by name) 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=20141203055144.GA1179@ad.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --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).