From: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Dong Xu Wang <wdongxu@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 2/2] block: track dirty flag status in qed
Date: Sat, 31 Dec 2011 17:06:28 +0800 [thread overview]
Message-ID: <1325322388-4825-2-git-send-email-wdongxu@linux.vnet.ibm.com> (raw)
In-Reply-To: <1325322388-4825-1-git-send-email-wdongxu@linux.vnet.ibm.com>
From: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
qed driver use QED_F_NEED_CHECK to mark if the image is clean.
CC: Kevin Wolf <kwolf@redhat.com>
CC: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
---
block/qed.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/block/qed.c b/block/qed.c
index 8da3ebe..1e909b1 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -1429,6 +1429,12 @@ static int bdrv_qed_check(BlockDriverState *bs, BdrvCheckResult *result)
return qed_check(s, result, false);
}
+static int bdrv_qed_is_dirty(BlockDriverState *bs)
+{
+ BDRVQEDState *s = bs->opaque;
+ return s->header.features & QED_F_NEED_CHECK;
+}
+
static QEMUOptionParameter qed_create_options[] = {
{
.name = BLOCK_OPT_SIZE,
@@ -1474,6 +1480,7 @@ static BlockDriver bdrv_qed = {
.bdrv_get_info = bdrv_qed_get_info,
.bdrv_change_backing_file = bdrv_qed_change_backing_file,
.bdrv_check = bdrv_qed_check,
+ .bdrv_is_dirty = bdrv_qed_is_dirty,
};
static void bdrv_qed_init(void)
--
1.7.5.4
next prev parent reply other threads:[~2011-12-31 9:07 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 ` Dong Xu Wang [this message]
2012-01-11 14:38 ` [Qemu-devel] [PATCH 2/2] block: track dirty flag status in qed 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
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=1325322388-4825-2-git-send-email-wdongxu@linux.vnet.ibm.com \
--to=wdongxu@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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).