From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 3/4 v2 RESEND] block: add dirty flag status to qemu-img
Date: Mon, 12 Mar 2012 18:18:13 +0000 [thread overview]
Message-ID: <20120312181813.GA21109@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1331112179-12726-3-git-send-email-wdongxu@linux.vnet.ibm.com>
On Wed, Mar 07, 2012 at 05:22:58PM +0800, Dong Xu Wang wrote:
> From: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
>
> Some block drivers can verify their image files are clean or not. So we can show
> it while using "qemu-img info.
>
> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> ---
> block.c | 14 ++++++++++++++
> block.h | 2 ++
> block_int.h | 1 +
> qemu-img.c | 3 +++
> 4 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/block.c b/block.c
> index 947607b..17e9ba8 100644
> --- a/block.c
> +++ b/block.c
> @@ -193,6 +193,20 @@ static void bdrv_io_limits_intercept(BlockDriverState *bs,
> qemu_co_queue_next(&bs->throttled_reqs);
> }
>
> +/* check if the image was cleanly shut down */
> +bool bdrv_not_cleanly_down(BlockDriverState *bs)
The name is a little cryptic to me and I suggest avoiding 'not' in
function names because it easily leads to double-negatives (!not_foo()).
How about:
bool bdrv_was_shutdown_cleanly()
if (!bdrv_was_shutdown_cleanly(bs)) {
printf(...);
}
This patch and the QED patch look fine otherwise.
Stefan
next prev parent reply other threads:[~2012-03-12 19:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 9:22 [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics to qemu-img Dong Xu Wang
2012-03-07 9:22 ` [Qemu-devel] [PATCH 2/4] block: image fragmentation statistics for qed Dong Xu Wang
2012-03-12 12:58 ` Stefan Hajnoczi
2012-03-07 9:22 ` [Qemu-devel] [PATCH 3/4 v2 RESEND] block: add dirty flag status to qemu-img Dong Xu Wang
2012-03-12 18:18 ` Stefan Hajnoczi [this message]
2012-03-13 9:03 ` Kevin Wolf
2012-03-13 9:33 ` Stefan Hajnoczi
2012-03-13 10:10 ` Kevin Wolf
2012-03-07 9:22 ` [Qemu-devel] [PATCH 4/4 v2 RESEND] block: track dirty flag status in qed Dong Xu Wang
2012-03-12 13:07 ` [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics to qemu-img Stefan Hajnoczi
2012-03-12 13:14 ` Kevin Wolf
2012-03-12 13:26 ` Stefan Hajnoczi
2012-03-12 13:36 ` 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=20120312181813.GA21109@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=wdongxu@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).