From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, John Snow <jsnow@redhat.com>,
armbru@redhat.com, mreitz@redhat.com, vsementsov@parallels.com,
stefanha@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v8 00/10] block: Incremental backup series
Date: Wed, 26 Nov 2014 12:41:45 -0500 [thread overview]
Message-ID: <1417023715-18210-1-git-send-email-jsnow@redhat.com> (raw)
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.
For convenience: https://github.com/jnsnow/qemu/commits/dbm-backup
John.
v8:
- Changed int64_t return for bdrv_dbm_calc_def_granularity to uint64_t (2/10)
- Updated commit message (2/10)
- Removed redundant check for null in device parameter (2/10)
- Removed comment cruft. (2/10)
- Removed redundant local_err propagation (several)
- Updated commit message (3/10)
- Fix HBitmap copy loop index (4/10)
- Remove redundant ternary (5/10)
- Shift up the block_dirty_bitmap_lookup function (6/10)
- Error messages cleanup (7/10)
- Add an assertion to explain the re-use of .prepare() for two transactions.
(8/10)
- Removed BDS argument from bitmap enable/disable helper; it was unused. (8/10)
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 | 130 +++++++++++++++++++++----
block/mirror.c | 16 ++--
blockdev.c | 218 +++++++++++++++++++++++++++++++++++++++++-
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 | 120 ++++++++++++++++++++++-
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, 712 insertions(+), 55 deletions(-)
--
1.9.3
next reply other threads:[~2014-11-26 17:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 17:41 John Snow [this message]
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 01/10] qapi: Add optional field "name" to block dirty bitmap John Snow
2014-11-27 9:36 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove John Snow
2014-11-27 9:41 ` Max Reitz
2014-12-01 18:52 ` John Snow
2014-12-02 9:34 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 03/10] block: Introduce bdrv_dirty_bitmap_granularity() John Snow
2014-11-27 9:42 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 04/10] hbitmap: Add hbitmap_copy John Snow
2014-11-27 9:43 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap John Snow
2014-11-27 9:44 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable John Snow
2014-11-27 10:03 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 07/10] qmp: Add support of "dirty-bitmap" sync mode for drive-backup John Snow
2014-11-27 9:18 ` Fam Zheng
2014-11-27 10:19 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable} John Snow
2014-11-27 10:25 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 09/10] qmp: Add dirty bitmap 'enabled' field in query-block John Snow
2014-11-27 10:26 ` Max Reitz
2014-11-26 17:41 ` [Qemu-devel] [PATCH v8 10/10] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap John Snow
2014-11-27 10:27 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417023715-18210-1-git-send-email-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).