From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtMCZ-0007I8-Ug for qemu-devel@nongnu.org; Tue, 25 Nov 2014 14:55:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtMCV-00072G-0Q for qemu-devel@nongnu.org; Tue, 25 Nov 2014 14:55:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtMCU-00071X-QO for qemu-devel@nongnu.org; Tue, 25 Nov 2014 14:55:02 -0500 Message-ID: <5474DE94.3040008@redhat.com> Date: Tue, 25 Nov 2014 14:55:00 -0500 From: John Snow MIME-Version: 1.0 References: <1416944800-17919-1-git-send-email-jsnow@redhat.com> In-Reply-To: <1416944800-17919-1-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [2.3 PATCH v7 00/10] block: Incremental backup series List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "kwo >> Kevin Wolf" , Fam Zheng , "mre >> Max Reitz" , vladimir Sementsov-Ogievskiy , Stefan Hajnoczi , "pbon >> Paolo Bonzini" On 11/25/2014 02:46 PM, John Snow wrote: > This is the in memory part of the incremental backup feature. > > With the added commands, we can create a bitmap on a block backend, from which > point of time all the writes are tracked by the bitmap, marking sectors as > dirty. Later, we call drive-backup and pass the bitmap to it, to do an > incremental backup. > > See the last patch which adds some tests for this use case. > > Fam > > == > > This is the next iteration of Fam's incremenetal backup feature. > I have since taken this over from him and have (slowly) worked through > the feedback to the last version of his patch and have made many > tiny little edits. > > -John. > > v7: (highlights) > - First version being authored by jsnow > - Addressed most list feedback from V6, many small changes. > All feedback was either addressed on-list (as a wontfix) or patched. > - Replaced all error_set with error_setg > - Replaced all bdrv_find with bdrv_lookup_bs() > - Adjusted the max granularity to share a common function with > backup/mirror that attempts to "guess" a reasonable default. > It clamps between [4K,64K] currently. > - The BdrvDirtyBitmap object now counts granularity exclusively in > bytes to match its interface. > It leaves the sector granularity concerns to HBitmap. > - Reworked the backup loop to utilize the hbitmap iterator. > There are some extra concerns to handle arrhythmic cases where the > granularity of the bitmap does not match the backup cluster size. > This iteration works best when it does match, but it's not a > deal-breaker if it doesn't -- it just gets less efficient. > - Reworked the transactional functions so that abort() wouldn't "undo" > a redundant command. They now have been split into a prepare and a > commit function (with state) and do not provide an abort command. > - Added a block_dirty_bitmap_lookup(device, name, errp) function to > shorten a few of the commands added in this series, particularly > qmp_enable, qmp_disable, and the transaction preparations. > > v6: Re-send of v5. > > v5: Rebase to master. > > v4: Last version tailored by Fam Zheng. > > Fam Zheng (10): > qapi: Add optional field "name" to block dirty bitmap > qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove > block: Introduce bdrv_dirty_bitmap_granularity() > hbitmap: Add hbitmap_copy > block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap > qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable > qmp: Add support of "dirty-bitmap" sync mode for drive-backup > qapi: Add transaction support to block-dirty-bitmap-{add, enable, > disable} > qmp: Add dirty bitmap 'enabled' field in query-block > qemu-iotests: Add tests for drive-backup sync=dirty-bitmap > > block-migration.c | 2 +- > block.c | 114 +++++++++++++++++++-- > block/backup.c | 128 ++++++++++++++++++++---- > block/mirror.c | 16 ++- > blockdev.c | 226 +++++++++++++++++++++++++++++++++++++++++- > hmp.c | 4 +- > include/block/block.h | 17 +++- > include/block/block_int.h | 6 ++ > include/qemu/hbitmap.h | 8 ++ > qapi-schema.json | 5 +- > qapi/block-core.json | 123 ++++++++++++++++++++++- > qmp-commands.hx | 66 +++++++++++- > tests/qemu-iotests/056 | 33 +++++- > tests/qemu-iotests/056.out | 4 +- > tests/qemu-iotests/iotests.py | 8 ++ > util/hbitmap.c | 16 +++ > 16 files changed, 722 insertions(+), 54 deletions(-) > Script missed the CCs. Sigh. For convenience: Github: https://github.com/jnsnow/qemu/tree/dbm-backup Git: https://github.com/jnsnow/qemu.git Thanks, --js