[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: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap |
Date: |
Wed, 26 Nov 2014 09:01:03 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [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