[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 06/10] block: add delayed bitmap successor cl
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 06/10] block: add delayed bitmap successor cleanup |
Date: |
Fri, 5 Jun 2015 13:56:10 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Jun 04, 2015 at 05:46:08PM -0400, John Snow wrote:
> @@ -3190,19 +3193,13 @@ BdrvDirtyBitmap
> *bdrv_dirty_bitmap_abdicate(BlockDriverState *bs,
> * we may wish to re-join the parent and child/successor.
> * The merged parent will be un-frozen, but not explicitly re-enabled.
> */
> -BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
> - BdrvDirtyBitmap *parent,
> - Error **errp)
> +static BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
> + BdrvDirtyBitmap *parent)
> {
> BdrvDirtyBitmap *successor = parent->successor;
>
> - if (!successor) {
> - error_setg(errp, "Cannot reclaim a successor when none is present");
> - return NULL;
> - }
> -
> + assert(successor);
> if (!hbitmap_merge(parent->bitmap, successor->bitmap)) {
> - error_setg(errp, "Merging of parent and successor bitmap failed");
> return NULL;
> }
Is this reachable? If the bitmap size and granularity match then
hbitmap_merge() does not fail.
This should probably be covered with an assertion instead to show that
this is not allowed to happen.
pgpb3_nWhXNeM.pgp
Description: PGP signature
- [Qemu-devel] [PATCH v5 00/10] block: incremental backup transactions, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 02/10] iotests: add transactional incremental backup test, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 04/10] block: re-add BlkTransactionState, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 07/10] qmp: Add an implementation wrapper for qmp_drive_backup, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 05/10] block: add transactional callbacks feature, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 06/10] block: add delayed bitmap successor cleanup, John Snow, 2015/06/04
- Re: [Qemu-devel] [PATCH v5 06/10] block: add delayed bitmap successor cleanup,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v5 01/10] qapi: Add transaction support to block-dirty-bitmap operations, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 03/10] block: rename BlkTransactionState and BdrvActionOps, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 09/10] iotests: 124 - transactional failure test, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 08/10] block: drive_backup transaction callback support, John Snow, 2015/06/04
- [Qemu-devel] [PATCH v5 10/10] qmp-commands.hx: Update the supported 'transaction' operations, John Snow, 2015/06/04