From: Luiz Capitulino <lcapitulino@redhat.com>
To: Supriya Kannery <supriyak@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] [RFC Patch 1/7]Qemu: Enhance "info block" to display host cache setting
Date: Wed, 8 Feb 2012 10:00:42 -0200 [thread overview]
Message-ID: <20120208100042.4747cf2c@doriath.home> (raw)
In-Reply-To: <20120201030614.2990.87825.sendpatchset@skannery.in.ibm.com>
On Wed, 01 Feb 2012 08:36:14 +0530
Supriya Kannery <supriyak@linux.vnet.ibm.com> wrote:
> Enhance "info block" to display hostcache setting for each
> block device.
>
> Example:
> (qemu) info block
> ide0-hd0: removable=0 file=../rhel6-32.raw ro=0 drv=raw encrypted=0
>
> Enhanced to display "hostcache" setting:
> (qemu) info block
> ide0-hd0: removable=0 hostcache=1 file=../rhel6-32.raw ro=0 drv=raw encrypted=0
The day we'll want to refactor 'info block' output is coming...
> Signed-off-by: Supriya Kannery <supriyak@linux.vnet.ibm.com>
>
> ---
> block.c | 20 ++++++++++++++++----
> qmp-commands.hx | 2 ++
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> Index: qemu/qapi-schema.json
> ===================================================================
> --- qemu.orig/qapi-schema.json
> +++ qemu/qapi-schema.json
> @@ -423,6 +423,8 @@
> # @locked: True if the guest has locked this device from having its media
> # removed
> #
> +# @hostcache: True if host pagecache is enabled.
> +#
> # @tray_open: #optional True if the device has a tray and it is open
> # (only present if removable is true)
> #
> @@ -436,7 +438,7 @@
> ##
> { 'type': 'BlockInfo',
> 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
> - 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
> + 'locked': 'bool','hostcache': 'bool', '*inserted': 'BlockDeviceInfo',
> '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
>
> ##
> Index: qemu/block.c
> ===================================================================
> --- qemu.orig/block.c
> +++ qemu/block.c
> @@ -2285,6 +2285,7 @@ BlockInfoList *qmp_query_block(Error **e
> info->value->device = g_strdup(bs->device_name);
> info->value->type = g_strdup("unknown");
> info->value->locked = bdrv_dev_is_medium_locked(bs);
> + info->value->hostcache = !(bs->open_flags & BDRV_O_NOCACHE);
> info->value->removable = bdrv_dev_has_removable_media(bs);
>
> if (bdrv_dev_has_removable_media(bs)) {
> Index: qemu/hmp.c
> ===================================================================
> --- qemu.orig/hmp.c
> +++ qemu/hmp.c
> @@ -209,6 +209,8 @@ void hmp_info_block(Monitor *mon)
> monitor_printf(mon, " tray-open=%d", info->value->tray_open);
> }
>
> + monitor_printf(mon, " hostcache=%d", info->value->hostcache);
> +
> if (info->value->has_io_status) {
> monitor_printf(mon, " io-status=%s",
> BlockDeviceIoStatus_lookup[info->value->io_status]);
>
next prev parent reply other threads:[~2012-02-08 12:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 3:05 [Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 1/7]Qemu: Enhance "info block" to display host cache setting Supriya Kannery
2012-02-08 12:00 ` Luiz Capitulino [this message]
2012-02-13 13:19 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 2/7]Qemu: Error classes for file reopen and data sync failure Supriya Kannery
2012-02-07 7:56 ` Stefan Hajnoczi
2012-02-13 13:13 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 3/7]Qemu: Cmd "block_set_hostcache" for dynamic cache change Supriya Kannery
2012-02-02 0:09 ` Michael Roth
2012-02-02 10:14 ` Kevin Wolf
2012-02-08 12:07 ` Luiz Capitulino
2012-02-13 13:21 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely Supriya Kannery
2012-02-07 10:08 ` Stefan Hajnoczi
2012-02-14 13:34 ` Supriya Kannery
2012-02-08 15:07 ` Kevin Wolf
2012-02-13 13:49 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen Supriya Kannery
2012-02-02 0:15 ` Michael Roth
2012-02-13 13:12 ` Supriya Kannery
2012-02-07 10:17 ` Stefan Hajnoczi
2012-02-14 13:36 ` Supriya Kannery
2012-02-08 14:54 ` Kevin Wolf
2012-02-13 13:28 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 " Supriya Kannery
2012-02-08 15:02 ` Kevin Wolf
2012-02-13 13:29 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 7/7]Qemu: vmdk " Supriya Kannery
2012-02-01 22:41 ` [Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change Eric Blake
2012-02-02 9:12 ` Kevin Wolf
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=20120208100042.4747cf2c@doriath.home \
--to=lcapitulino@redhat.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=supriyak@linux.vnet.ibm.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).