From: "Benoît Canet" <benoit@irqsave.net>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com,
"Benoît Canet" <benoit@irqsave.net>,
stefanha@redhat.com
Subject: [Qemu-devel] [RFC V1 08/12] qcow2: Add qcow2_resume_dedup.
Date: Wed, 16 Jan 2013 17:25:14 +0100 [thread overview]
Message-ID: <1358353518-5421-9-git-send-email-benoit@irqsave.net> (raw)
In-Reply-To: <1358353518-5421-1-git-send-email-benoit@irqsave.net>
---
block/qcow2-dedup.c | 14 ++++++++++++++
block/qcow2.c | 1 +
block/qcow2.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index e007387..93545af 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -1469,3 +1469,17 @@ void qcow2_pause_dedup(BlockDriverState *bs)
qcow2_dedup_reset(bs);
s->dedup_status = QCOW_DEDUP_STOPPED;
}
+
+void qcow2_resume_dedup(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+
+ if (s->dedup_status != QCOW_DEDUP_STOPPED) {
+ return;
+ }
+
+ s->dedup_status = QCOW_DEDUP_STARTING;
+
+ s->dedup_resume_co = qemu_coroutine_create(qcow2_co_dedup_resume);
+ qemu_coroutine_enter(s->dedup_resume_co, bs);
+}
diff --git a/block/qcow2.c b/block/qcow2.c
index c17ab63..d5681ad 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2012,6 +2012,7 @@ static BlockDriver bdrv_qcow2 = {
.bdrv_invalidate_cache = qcow2_invalidate_cache,
.bdrv_pause_dedup = qcow2_pause_dedup,
+ .bdrv_resume_dedup = qcow2_resume_dedup,
.create_options = qcow2_create_options,
.bdrv_check = qcow2_check,
diff --git a/block/qcow2.h b/block/qcow2.h
index 5940c89..2b5a7d4 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -512,5 +512,6 @@ int qcow2_dedup_init(BlockDriverState *bs);
void qcow2_dedup_close(BlockDriverState *bs);
void qcow2_dedup_update_metrics(BlockDriverState *bs);
void qcow2_pause_dedup(BlockDriverState *bs);
+void qcow2_resume_dedup(BlockDriverState *bs);
#endif
--
1.7.10.4
next prev parent reply other threads:[~2013-01-16 16:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 16:25 [Qemu-devel] [RFC V1 00/12] QCOW2 asynchronous deduplication Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 01/12] block: Add BlockDriver function prototype to pause and resume deduplication Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 02/12] qcow2: Add code to deduplicate cluster flagged with QCOW_OFLAG_TO_DEDUP Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 03/12] block: Add bdrv_has_dedup Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 04/12] block: Add bdrv_is_dedup_running Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 05/12] block: Add bdrv_resume_dedup Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 06/12] block: Add bdrv_pause_dedup Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 07/12] qcow2: Add qcow2_pause_dedup Benoît Canet
2013-01-16 16:25 ` Benoît Canet [this message]
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 09/12] qcow2: Make dedup status persists Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 10/12] qerror: Add QERR_DEVICE_NOT_DEDUPLICATED Benoît Canet
2013-01-16 23:00 ` Eric Blake
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 11/12] qmp: Add block-pause-dedup Benoît Canet
2013-01-16 23:32 ` Eric Blake
2013-01-17 11:20 ` Benoît Canet
2013-01-16 16:25 ` [Qemu-devel] [RFC V1 12/12] qmp: Add block_resume_dedup Benoît Canet
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=1358353518-5421-9-git-send-email-benoit@irqsave.net \
--to=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).