From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>,
qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] block: add dirty flag status to qemu-img
Date: Wed, 11 Jan 2012 15:47:32 +0100 [thread overview]
Message-ID: <4F0DA104.7000509@redhat.com> (raw)
In-Reply-To: <CAJSP0QXiJ-uYTPt=ZJsdD-SR6jZBOS37W9jVgOXMMVAw6C+3_A@mail.gmail.com>
Am 11.01.2012 15:35, schrieb Stefan Hajnoczi:
> On Sat, Dec 31, 2011 at 9:06 AM, Dong Xu Wang
> <wdongxu@linux.vnet.ibm.com> wrote:
>> +int bdrv_is_dirty(BlockDriverState *bs)
>
> bool would be nicer instead of int. Traditionally we used int but C99
> has been around for a long time now and it's more appropriate.
>
>> diff --git a/qemu-img.c b/qemu-img.c
>> index 01cc0d3..a79c274 100644
>> --- a/qemu-img.c
>> +++ b/qemu-img.c
>> @@ -1153,6 +1153,9 @@ static int img_info(int argc, char **argv)
>> if (bdrv_is_encrypted(bs)) {
>> printf("encrypted: yes\n");
>> }
>> + if (bdrv_is_dirty(bs)) {
>> + printf("dirty,need check: yes\n");
>> + }
>
> I suggest avoiding the comma and just saying "needs check: yes\n".
In fact I would reverse the logic and make it something like "cleanly
shut down: no", it will better describe the situation when the VM is
still running. Same for the function names, "dirty" could mean anything.
Kevin
prev parent reply other threads:[~2012-01-11 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-31 9:06 [Qemu-devel] [PATCH 1/2] block: add dirty flag status to qemu-img Dong Xu Wang
2011-12-31 9:06 ` [Qemu-devel] [PATCH 2/2] block: track dirty flag status in qed Dong Xu Wang
2012-01-11 14:38 ` Stefan Hajnoczi
2012-01-11 14:35 ` [Qemu-devel] [PATCH 1/2] block: add dirty flag status to qemu-img Stefan Hajnoczi
2012-01-11 14:47 ` Kevin Wolf [this message]
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=4F0DA104.7000509@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--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 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.