[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V5 55/62] block: Add bdrv_resume_dedup.
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V5 55/62] block: Add bdrv_resume_dedup. |
Date: |
Wed, 16 Jan 2013 16:48:34 +0100 |
---
block.c | 19 +++++++++++++++++++
include/block/block.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/block.c b/block.c
index e83666a..4e80da8 100644
--- a/block.c
+++ b/block.c
@@ -4361,6 +4361,25 @@ bool bdrv_is_dedup_running(BlockDriverState *bs)
return bdi.dedup_running;
}
+int bdrv_resume_dedup(BlockDriverState *bs)
+{
+ BlockDriver *drv = bs->drv;
+
+ if (!bdrv_has_dedup(bs)) {
+ return -EINVAL;
+ }
+
+ if (bdrv_is_dedup_running(bs)) {
+ return 0;
+ }
+
+ if (drv && drv->bdrv_resume_dedup) {
+ drv->bdrv_resume_dedup(bs);
+ }
+
+ return 0;
+}
+
/* needed for generic scsi interface */
int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
diff --git a/include/block/block.h b/include/block/block.h
index f4e1d2a..94ac50a 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -308,6 +308,7 @@ int bdrv_media_changed(BlockDriverState *bs);
void bdrv_lock_medium(BlockDriverState *bs, bool locked);
bool bdrv_has_dedup(BlockDriverState *bs);
bool bdrv_is_dedup_running(BlockDriverState *bs);
+int bdrv_resume_dedup(BlockDriverState *bs);
void bdrv_eject(BlockDriverState *bs, bool eject_flag);
const char *bdrv_get_format_name(BlockDriverState *bs);
BlockDriverState *bdrv_find(const char *name);
--
1.7.10.4
- [Qemu-devel] [RFC V5 29/62] qcow2: Integrate SKEIN hash algorithm in deduplication., (continued)
- [Qemu-devel] [RFC V5 29/62] qcow2: Integrate SKEIN hash algorithm in deduplication., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 33/62] qemu-iotests: Filter dedup=on/off so existing tests don't break., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 31/62] qcow2: Use large L2 table for deduplication., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 32/62] qcow: Set large dedup hash block size., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 45/62] qcow2: Count deduplication refcount overflow metric., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 42/62] qcow2: Count QCowHashNode creation metrics., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 46/62] qapi: Add support for deduplication infos in qapi-schema.json., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 53/62] block: Add bdrv_has_dedup., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 52/62] qcow2: Add code to deduplicate cluster flagged with QCOW_OFLAG_TO_DEDUP., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 54/62] block: Add bdrv_is_dedup_running., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 55/62] block: Add bdrv_resume_dedup.,
Benoît Canet <=
- [Qemu-devel] [RFC V5 61/62] qmp: Add block-pause-dedup., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 62/62] qmp: Add block_resume_dedup., Benoît Canet, 2013/01/16
- Re: [Qemu-devel] [RFC V5 00/62] QCOW2 deduplication, Eric Blake, 2013/01/16
- [Qemu-devel] [RFC V5 41/62] qcow2: Collect undeduplicated cluster metric., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 25/62] qcow2: Add verification of dedup table., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 39/62] qcow2: Collect unaligned writes missing data reads metric., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 59/62] qcow2: Make dedup status persists., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 21/62] qcow2: Remove hash when cluster is deleted., Benoît Canet, 2013/01/16
- [Qemu-devel] [RFC V5 51/62] block: Add BlockDriver function prototype to pause and resume deduplication., Benoît Canet, 2013/01/16