[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap |
Date: |
Thu, 27 Nov 2014 10:05:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 11/26/2014 05:43 AM, Max Reitz wrote:
>> On 2014-11-25 at 20:46, John Snow wrote:
>>> From: Fam Zheng <address@hidden>
>>>
>>> Signed-off-by: Fam Zheng <address@hidden>
>>> Signed-off-by: John Snow <address@hidden>
>>> ---
>>> block.c | 35 +++++++++++++++++++++++++++++++----
>>> include/block/block.h | 4 ++++
>>> 2 files changed, 35 insertions(+), 4 deletions(-)
>>>
>
>>> @@ -5406,7 +5431,9 @@ int64_t
>>> bdrv_dbm_calc_def_granularity(BlockDriverState *bs)
>>> int64_t bdrv_dirty_bitmap_granularity(BlockDriverState *bs,
>>> BdrvDirtyBitmap *bitmap)
>>> {
>>> - return BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap);
>>> + g_assert(BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap)
>>> == \
>>> + bitmap->granularity);
>>
>> Do you really need that backslash?
>>
>> If you don't and remove it, or if you do and keep it, and with either
>> "name ? g_strdup(name) : NULL" left as-is or replace by "g_strdup(name)":
>>
>
> g_strdup(NULL) is safe, so 'name ? g_strdup(name) : NULL' is pointless
> and can be written as 'g_strdup(name)' with no change in functionality.
Yes, please. See also:
80e0090 virtio: Drop superfluous conditionals around g_strdup()
c14e984 vnc: Drop superfluous conditionals around g_strdup()
- [Qemu-devel] [2.3 PATCH v7 00/10] block: Incremental backup series, John Snow, 2014/11/25
- [Qemu-devel] [2.3 PATCH v7 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable, John Snow, 2014/11/25
- [Qemu-devel] [2.3 PATCH v7 10/10] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap, John Snow, 2014/11/25
- [Qemu-devel] [2.3 PATCH v7 07/10] qmp: Add support of "dirty-bitmap" sync mode for drive-backup, John Snow, 2014/11/25
- [Qemu-devel] [2.3 PATCH v7 04/10] hbitmap: Add hbitmap_copy, John Snow, 2014/11/25
- [Qemu-devel] [2.3 PATCH v7 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}, John Snow, 2014/11/25