[Top][All Lists]

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

Re: [Qemu-block] [PATCH 10/22] qcow2-dirty-bitmap: add qcow2_bitmap_stor

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH 10/22] qcow2-dirty-bitmap: add qcow2_bitmap_store()
Date: Wed, 23 Mar 2016 11:25:57 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 22.03.2016 21:49, Eric Blake wrote:
On 03/15/2016 02:04 PM, Vladimir Sementsov-Ogievskiy wrote:
This function stores block dirty bitmap to qcow2. If the bitmap with
the same name, size and granularity already exists, it will be
rewritten, if the bitmap with the same name exists but granularity or
size does not match, an error will be genrated.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
+/* if no id is provided, a new one is constructed */
+static int qcow2_bitmap_create(BlockDriverState *bs, const char *name,
+                               uint64_t size, int granularity)
+    int ret;
+    BDRVQcow2State *s = bs->opaque;
+    if (s->nb_bitmaps >= QCOW_MAX_DIRTY_BITMAPS) {
+        return -EFBIG;
+    }
+    /* Check that the name is unique */
+    if (find_bitmap_by_name(bs, name) != NULL) {
+        return -EEXIST;
+    }
Is the comment about constructing a name stale or misplaced?

It's a mistake, thanks. Don't remember, where I stole it)

Best regards,

reply via email to

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