From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acBIj-000240-BD for qemu-devel@nongnu.org; Sat, 05 Mar 2016 07:27:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acBIg-0002Md-1V for qemu-devel@nongnu.org; Sat, 05 Mar 2016 07:27:17 -0500 Received: from mx2.parallels.com ([199.115.105.18]:45821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acBIf-0002MG-RS for qemu-devel@nongnu.org; Sat, 05 Mar 2016 07:27:13 -0500 Message-ID: <56DAD088.1070808@virtuozzo.com> Date: Sat, 5 Mar 2016 15:26:48 +0300 From: Vladimir Sementsov-Ogievskiy MIME-Version: 1.0 References: <1455722949-17060-1-git-send-email-vsementsov@virtuozzo.com> <56D9CD52.8010700@redhat.com> In-Reply-To: <56D9CD52.8010700@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 RFC 00/17] qcow2: persistent dirty bitmaps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com On 04.03.2016 21:00, John Snow wrote: > > On 02/17/2016 10:28 AM, Vladimir Sementsov-Ogievskiy wrote: >> This series add persistent dirty bitmaps feature to qcow2. >> Specification is in docs/spec/qcow2.txt (not merged yet, see >> [PATCH v10] spec: add qcow2 bitmaps extension specification) >> >> This series are based on Fam's >> [PATCH v2 00/13] Dirty bitmap changes for migration/persistence work >> (meta bitmaps not used, and only hbitmap_deserialize_finish from >> serialization) >> >> This also needs some preparation patches, most of them are in my >> bitmap-migration series. I've not listed them here to keep things >> simpler, this is RFC any way. >> >> v4: >> >> Previous version was posted more than five months ago, so I will not >> carefully list all changes. >> >> What should be noted: >> - some changes are made to sutisfy last version of specification >> - removed staff, related to possibility of saving bitmaps for one >> disk in the other qcow2. >> - to make bitmap store/load zero-copy, I've moved load/store code to >> HBitmap - this is new patch 01. >> so, bdrv_dirty_bitmap_serialize_part and friends are not needed, >> only hbitmap_deserialize_finish, to repair bitmap consistency after >> loading its last level. >> - two patches added about AUTO and EXTRA_DATA_COMPATIBLE flags >> - some fixes made after John's comments on v3 >> >> Vladimir Sementsov-Ogievskiy (17): >> hbitmap: load/store >> qcow2: Bitmaps extension: structs and consts >> qcow2-dirty-bitmap: read dirty bitmap directory >> qcow2-dirty-bitmap: add qcow2_bitmap_load() >> qcow2-dirty-bitmap: add qcow2_bitmap_store() >> qcow2: add dirty bitmaps extension >> qcow2-dirty-bitmap: add qcow2_bitmap_load_check() >> block: store persistent dirty bitmaps >> block: add bdrv_load_dirty_bitmap() >> qcow2-dirty-bitmap: add autoclear bit >> qemu: command line option for dirty bitmaps >> qcow2-dirty-bitmap: add IN_USE flag >> qcow2-dirty-bitmaps: disallow stroing bitmap to other bs >> iotests: add VM.test_launcn() >> iotests: test internal persistent dirty bitmap >> qcow2-dirty-bitmap: add AUTO flag >> qcow2-dirty-bitmap: add EXTRA_DATA_COMPATIBLE flag >> >> block.c | 3 + >> block/Makefile.objs | 2 +- >> block/dirty-bitmap.c | 101 +++++ >> block/qcow2-dirty-bitmap.c | 839 ++++++++++++++++++++++++++++++++++++++++++ >> block/qcow2.c | 105 +++++- >> block/qcow2.h | 59 +++ >> blockdev.c | 36 ++ >> include/block/block_int.h | 9 + >> include/block/dirty-bitmap.h | 21 ++ >> include/qemu/hbitmap.h | 12 + >> include/sysemu/blockdev.h | 1 + >> include/sysemu/sysemu.h | 1 + >> qemu-options.hx | 35 ++ >> tests/qemu-iotests/160 | 112 ++++++ >> tests/qemu-iotests/160.out | 21 ++ >> tests/qemu-iotests/group | 1 + >> tests/qemu-iotests/iotests.py | 25 ++ >> util/hbitmap.c | 182 +++++++++ >> vl.c | 78 ++++ >> 19 files changed, 1640 insertions(+), 3 deletions(-) >> create mode 100644 block/qcow2-dirty-bitmap.c >> create mode 100755 tests/qemu-iotests/160 >> create mode 100644 tests/qemu-iotests/160.out >> > In your prerequisite patches, > > "iotests-add-default-node-name" breaks qemu iotests 055 and 118. Didn't > look hard enough to find out why, yet. 118 doesn't work for me anyway (./check -qcow2 118 , yes?), for 055 you are right, it's not hard, the following helps: def add_drive(self, path, opts='', interface='virtio'): '''Add a virtio-blk drive to the VM''' options = ['if=%s' % interface, - 'id=drive%d' % self._num_drives, - 'node-name=drivenode%d' % self._num_drives] + 'id=drive%d' % self._num_drives] if path is not None: + options.append('node-name=drivenode%d' % self._num_drives) options.append('file=%s' % path) options.append('format=%s' % imgfmt) options.append('cache=%s' % cachemode) -- Best regards, Vladimir