qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and bl


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove
Date: Fri, 7 Nov 2014 15:24:22 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

+    if (!name || name[0] == '\0') {
Isn't is better to move "name[0] == '\0'" check to bdrv_create_dirty_bitmap, near existed name checking?

+        if (granularity < 512 || is_power_of_2(granularity)) {
+            error_setg(errp, "Granularity must be power of 2 "
+                             "and greater than 512");
+            return;
+        }
+    } else {
+        granularity = 65536;
+    }
Why not using something like DEFAULT_CLUSTER_SIZE, as in block/qcow2.h ?

--
Best regards,
Vladimir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]