Received: from eggs.gnu.org ([2001:4830:134:3::10]:43755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCrpB-0006HI-DK for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCrp5-0003UV-Cp for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:08:24 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:34441 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCrp4-0003Ty-Vu for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:08:19 -0400 From: Vladimir Sementsov-Ogievskiy Date: Tue, 14 Jun 2016 20:08:11 +0300 Message-Id: <1465924093-76875-1-git-send-email-vsementsov@virtuozzo.com> Subject: [Qemu-devel] [PATCH v2 0/2] block: fix libvirt snapshot with existing bitmaps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: den@openvz.org, vsementsov@virtuozzo.com, kwolf@redhat.com, mreitz@redhat.com v2: - additional patch with asserts for hbitmap. As BdrvDirtyBitmap is only an interlayer here, I decided to plase asserts into HBitmap public functions. - add comment - from Max's comments: - assert after if block - bitmap->size instead of bdrv_nb_sectors. It is not beautiful, but with bdrv_nb_sectors we have to handle error code here, which would be worse I think. Vladimir Sementsov-Ogievskiy (2): hbitmap: add 'pos < size' asserts block: fix libvirt snapshot with existing bitmaps block/dirty-bitmap.c | 14 ++++++++++++++ util/hbitmap.c | 3 +++ 2 files changed, 17 insertions(+) -- 1.8.3.1