[Qemu-block] [PATCH v5 00/11] backup-top filter driver for backup

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series introduce backup-top driver. It's a filter-node, which do copy-before-write operation. Mirror uses filter-node for handling guest writes, let's move to filter-node (from write-notifiers) for backup too v5: Now, based on John's bitmaps branch patch "block: allow serialized

[Qemu-block] [PATCH v5 06/11] iotests: prepare 055 to graph changes during backup job

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Backup will append fleecing-hook node above source node, so, we can't resume by device name (because resume don't search recursively through backing chain). Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/055 | 23 +-- 1 file changed, 13 insertions(+), 10

[Qemu-block] [PATCH v5 04/11] iotests: handle -f argument correctly for qemu_io_silent

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Correctly rewrite default argument. After the patch, the function can be used for other (not only default test-chosen) image format. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[Qemu-block] [PATCH v5 08/11] block/io: refactor wait_serialising_requests

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Split out do_wait_serialising_requests with additional possibility to not actually wait but just check, that there is something to wait for. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git

[Qemu-block] [PATCH v5 03/11] block: improve should_update_child

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
As it already said in the comment, we don't want to create loops in parent->child relations. So, when we try to append @to to @c, we should check that @c is not in @to children subtree, and we should check it recursively, not only the first level. The patch provides BFS-based search, to check the

[Qemu-block] [PATCH v5 09/11] block: add lock/unlock range functions

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Introduce lock/unlock range functionality, based on serialized requests. This is needed to refactor backup, dropping local tracked-request-like synchronization. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 4 block/io.c

[Qemu-block] [PATCH v5 01/11] block/backup: simplify backup_incremental_init_copy_bitmap

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Simplify backup_incremental_init_copy_bitmap using the function bdrv_dirty_bitmap_next_dirty_area. Note: move to job->len instead of bitmap size: it should not matter but less code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 40 1

[Qemu-block] [PATCH v5 05/11] iotests: allow resume_drive by node name

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
After node graph changes, we may not be able to resume_drive by device name (backing files are not recursively searched). So, lets allow to resume by node-name. Set constant name for breakpoints, to avoid introducing extra parameters. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH v5 07/11] block: introduce backup-top filter driver

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Backup-top filter does copy-before-write operation. It should be inserted above active disk and has a target node for CBW, like the following: +---+ | Guest | +---+---+ |r,w v +---+---+ target +---+ | backup_top|-->|

[Qemu-block] [PATCH v5 02/11] block/backup: move to copy_bitmap with granularity

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
We are going to share this bitmap between backup and backup-top filter driver, so let's share something more meaningful. It also simplifies some calculations. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 48 +++- 1 file changed, 23

[Qemu-block] [PATCH v5 11/11] block/backup: use backup-top instead of write notifiers

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Drop write notifiers and use filter node instead. Changes: 1. copy-before-writes now handled by filter node, so, drop all is_write_notifier arguments. 2. we don't have intersecting requests, so their handling is dropped. Instead, synchronization works as follows: when backup or backup-top

[Qemu-block] ping3 Re: [PATCH v4 00/10] NBD reconnect

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
ping 31.07.2018 20:30, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > Here is NBD reconnect. Previously, if connection failed all current > and future requests will fail. After the series, nbd-client driver > will try to reconnect unlimited times. During first @reconnect-delay > seconds of

[Qemu-block] [PATCH v5 10/11] block/backup: tiny refactor backup_job_create

2018-12-29 Thread Vladimir Sementsov-Ogievskiy
Move copy-bitmap find/create code. It's needed for the following commit, as we'll need copy_bitmap before actual block job creation. Do it in a separate commit to simplify review. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 69