From: Stefan Hajnoczi <stefanha@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] block: add resize monitor command
Date: Thu, 20 Jan 2011 08:56:07 +0000 [thread overview]
Message-ID: <20110120085529.GA24021@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <20110119170248.GA9819@lst.de>
On Wed, Jan 19, 2011 at 06:02:48PM +0100, Christoph Hellwig wrote:
> Index: qemu/hmp-commands.hx
> ===================================================================
> --- qemu.orig/hmp-commands.hx 2011-01-19 17:47:10.444004409 +0100
> +++ qemu/hmp-commands.hx 2011-01-19 17:49:51.673254095 +0100
> @@ -53,6 +53,25 @@ Quit the emulator.
> ETEXI
>
> {
> + .name = "resize",
> + .args_type = "id:s,size:o",
> + .params = "device size",
> + .help = "resize a block image",
> + .user_print = monitor_user_noop,
> + .mhandler.cmd_new = do_resize,
> + },
> +
> +STEXI
> +@item resize
> +@findex resize
> +Resize a block image while a guest is running. Usually requires guest
> +action to see the updated size. Resize to a lower size is supported,
> +but should be used with extreme caution. Note that this command only
> +resizes image files, it can not resize block devices like LVM volumes.
> +ETEXI
> +
> +
> + {
> .name = "eject",
> .args_type = "force:-f,device:B",
> .params = "[-f] device",
[...]
> Index: qemu/qmp-commands.hx
> ===================================================================
> --- qemu.orig/qmp-commands.hx 2011-01-19 17:47:10.478012371 +0100
> +++ qemu/qmp-commands.hx 2011-01-19 17:50:07.406016841 +0100
> @@ -601,6 +601,34 @@ Example:
> -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
> <- { "return": {} }
>
> +
> +EQMP
> +
> + {
> + .name = "block_resize",
> + .args_type = "id:s,size:o",
> + .params = "id size",
> + .help = "resize a block image",
> + .user_print = monitor_user_noop,
> + .mhandler.cmd_new = do_resize,
> + },
> +
> +SQMP
> +block_resize
> +------------
> +
> +Resize a block image while a guest is running.
> +
> +Arguments:
> +
> +- "id": the device's ID, must be unique (json-string)
> +- "size": new size
> +
> +Example:
> +
> +-> { "execute": "block_resize", "arguments": { "id": "scratch", "size": 1073741824 } }
> +<- { "return": {} }
> +
> EQMP
eject, change, block_passwd, and others call the device name argument
"device" instead of "id". In the interest of a consistent external API
it would be nice to use "device" for the block_resize command too.
Stefan
next prev parent reply other threads:[~2011-01-20 8:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 17:02 [Qemu-devel] [PATCH 0/3 v2] allow online resizing of block devices Christoph Hellwig
2011-01-19 17:02 ` [Qemu-devel] [PATCH 1/3] block: add resize monitor command Christoph Hellwig
2011-01-20 8:56 ` Stefan Hajnoczi [this message]
2011-01-20 9:43 ` Christoph Hellwig
2011-01-19 17:02 ` [Qemu-devel] [PATCH 2/3] block: tell drivers about an image resize Christoph Hellwig
2011-01-20 9:14 ` Stefan Hajnoczi
2011-01-20 9:44 ` Christoph Hellwig
2011-01-21 10:41 ` Kevin Wolf
2011-01-19 17:03 ` [Qemu-devel] [PATCH 3/3] virtio-blk: tell the guest about size changes Christoph Hellwig
2011-01-19 17:26 ` [Qemu-devel] Re: [PATCH 0/3 v2] allow online resizing of block devices Juan Quintela
2011-01-20 9:42 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2011-01-14 16:20 [Qemu-devel] [PATCH 0/3] " Christoph Hellwig
2011-01-14 16:20 ` [Qemu-devel] [PATCH 1/3] block: add resize monitor command Christoph Hellwig
2011-01-17 11:28 ` Stefan Hajnoczi
2011-01-17 15:59 ` Christoph Hellwig
2011-01-17 17:36 ` Kevin Wolf
2011-01-18 12:28 ` Christoph Hellwig
2011-01-19 15:35 ` Christoph Hellwig
2011-01-19 15:49 ` Kevin Wolf
2011-01-19 15:52 ` Christoph Hellwig
2011-01-19 16:01 ` Kevin Wolf
2011-01-19 16:31 ` Christoph Hellwig
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=20110120085529.GA24021@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=hch@lst.de \
--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 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).