[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 23/42] block/io: turn on dirty_bitmaps for the compre
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 23/42] block/io: turn on dirty_bitmaps for the compressed writes |
Date: |
Mon, 5 Sep 2016 20:13:35 +0200 |
From: Pavel Butsykin <address@hidden>
Previously was added the assert:
commit 1755da16e32c15b22a521e8a38539e4b5cf367f3
Author: Paolo Bonzini <address@hidden>
Date: Thu Oct 18 16:49:18 2012 +0200
block: introduce new dirty bitmap functionality
Now the compressed write is always in coroutine and setting the bits is
done after the write, so that we can return the dirty_bitmaps for the
compressed writes.
Signed-off-by: Pavel Butsykin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Jeff Cody <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Eric Blake <address@hidden>
CC: John Snow <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/io.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/block/io.c b/block/io.c
index 0339911..fdf7080 100644
--- a/block/io.c
+++ b/block/io.c
@@ -896,7 +896,6 @@ bdrv_driver_pwritev_compressed(BlockDriverState *bs,
uint64_t offset,
return -ENOTSUP;
}
- assert(QLIST_EMPTY(&bs->dirty_bitmaps));
return drv->bdrv_co_pwritev_compressed(bs, offset, bytes, qiov);
}
@@ -1318,6 +1317,8 @@ static int coroutine_fn
bdrv_aligned_pwritev(BlockDriverState *bs,
} else if (flags & BDRV_REQ_ZERO_WRITE) {
bdrv_debug_event(bs, BLKDBG_PWRITEV_ZERO);
ret = bdrv_co_do_pwrite_zeroes(bs, offset, bytes, flags);
+ } else if (flags & BDRV_REQ_WRITE_COMPRESSED) {
+ ret = bdrv_driver_pwritev_compressed(bs, offset, bytes, qiov);
} else if (bytes <= max_transfer) {
bdrv_debug_event(bs, BLKDBG_PWRITEV);
ret = bdrv_driver_pwritev(bs, offset, bytes, qiov, flags);
@@ -1569,14 +1570,9 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child,
bytes = ROUND_UP(bytes, align);
}
- if (flags & BDRV_REQ_WRITE_COMPRESSED) {
- ret = bdrv_driver_pwritev_compressed(
- bs, offset, bytes, use_local_qiov ? &local_qiov : qiov);
- } else {
- ret = bdrv_aligned_pwritev(bs, &req, offset, bytes, align,
- use_local_qiov ? &local_qiov : qiov,
- flags);
- }
+ ret = bdrv_aligned_pwritev(bs, &req, offset, bytes, align,
+ use_local_qiov ? &local_qiov : qiov,
+ flags);
fail:
--
1.8.3.1
- [Qemu-block] [PULL 15/42] block: Convert bdrv_pwrite_compressed() to BdrvChild, (continued)
- [Qemu-block] [PULL 15/42] block: Convert bdrv_pwrite_compressed() to BdrvChild, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 19/42] vmdk: add vmdk_co_pwritev_compressed, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 11/42] block: Accept node-name for drive-mirror, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 13/42] nbd-server: Allow node name for nbd-server-add, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 17/42] qcow2: add qcow2_co_pwritev_compressed, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 18/42] qcow2: cleanup qcow2_co_pwritev_compressed to avoid the recursion, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 21/42] qcow: cleanup qcow_co_pwritev_compressed to avoid the recursion, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 20/42] qcow: add qcow_co_pwritev_compressed, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 22/42] block: remove BlockDriver.bdrv_write_compressed, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 28/42] qemu-iotests: test backup compression in 055, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 23/42] block/io: turn on dirty_bitmaps for the compressed writes,
Kevin Wolf <=
- [Qemu-block] [PULL 24/42] block: simplify drive-backup, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 25/42] block: simplify blockdev-backup, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 29/42] qemu-iotests: add vmdk for test backup compression in 055, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 26/42] drive-backup: added support for data compression, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 27/42] blockdev-backup: added support for data compression, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 30/42] test-coroutine: Fix coroutine pool corruption, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 32/42] coroutine: Let CoMutex remember who holds it, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 31/42] qcow2: fix iovec size at qcow2_co_pwritev_compressed, Kevin Wolf, 2016/09/05