qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()
Date: Thu, 13 Oct 2016 19:48:25 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 07.10.2016 22:24, Max Reitz wrote:
On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote:
Realize block bitmap stroing interface, to allow qcow2 images store

[snip]

+        uint64_t end = MIN(bm_size, sector + dsc);
+        uint64_t write_size =
+            bdrv_dirty_bitmap_serialization_size(bitmap, sector, end - sector);
+
+        int64_t off = qcow2_alloc_clusters(bs, cl_size);
+        if (off < 0) {
+            ret = off;
+            goto finish;
+        }
+        bitmap_table[cluster] = off;
+
+        bdrv_dirty_bitmap_serialize_part(bitmap, buf, sector, end);
s/end/end - sector/?

o_0 terrible mistake, thank you.


+        if (write_size < cl_size) {
+            memset(buf + write_size, 0, cl_size - write_size);
+        }
+
I guess there should be a metadata overlap check here.

What is the general rule of checking it? Should I check it before all my extension related writes?


--
Best regards,
Vladimir




reply via email to

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