From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aie7J-00023o-Iv for qemu-devel@nongnu.org; Wed, 23 Mar 2016 04:26:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aie7E-0002Tq-Jp for qemu-devel@nongnu.org; Wed, 23 Mar 2016 04:26:13 -0400 References: <1458072268-53705-1-git-send-email-vsementsov@virtuozzo.com> <1458072268-53705-11-git-send-email-vsementsov@virtuozzo.com> <56F193A1.2030108@redhat.com> From: Vladimir Sementsov-Ogievskiy Message-ID: <56F25315.6070409@virtuozzo.com> Date: Wed, 23 Mar 2016 11:25:57 +0300 MIME-Version: 1.0 In-Reply-To: <56F193A1.2030108@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/22] qcow2-dirty-bitmap: add qcow2_bitmap_store() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, den@openvz.org, jsnow@redhat.com 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. > s/genrated/generated/ > >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> + >> +/* 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, Vladimir