[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 18/18] block/backup: use fleecing-hook instea
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v3 18/18] block/backup: use fleecing-hook instead of write notifiers |
Date: |
Wed, 3 Oct 2018 18:46:58 +0000 |
01.10.2018 13:29, Vladimir Sementsov-Ogievskiy wrote:
> 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 fleecing-hook starts copying of some area it firstly
> clears copy-bitmap bits, and nobody touches areas, not marked with
> dirty bits in copy-bitmap, so there no intersection. Also, read
> requests are marked serializing, to not interfer with guest writes and
> not read changed data from source (before reading we clear
> corresponding bit in copy-bitmap, so, this area is not more handled by
> fleecing-hook).
>
> 3. To sync with in-flight requests we no just drain hook node, we don't
> need rw-lock.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
>
There is a problem in this patch: to be sure, that if backup job started
to read from source, guest will not write to the area, I use
1. dirty bitmap: if it is set this means there must not be any in flight
write requests on source on this region
2. serialized read: we start it, so until it finishes nobody writes
But backup may restart copy operation if it failed. And of course,
second try of read may appear after guest write.. I see the following
way to fix:
don't retry the whole operation, but only read. Then all there reads
will be serialized and no yield point between them, so, guest can't
write until we finish..
in the same time, retrying of copy_range() operation should be OK as is,
as it keeps read serialized requests during the whole operation.
so, a kind of refactoring needed here.
Or, is it better to create external interface for creating serialized
requests? something like bdrv_co_pblockwrite, which will block writes on
this region, by creating special serialized request, until paired
bdrv_co_punblockwrite()?
--
Best regards,
Vladimir
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, (continued)
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, Vladimir Sementsov-Ogievskiy, 2018/10/05
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, Kevin Wolf, 2018/10/05
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, Vladimir Sementsov-Ogievskiy, 2018/10/05
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, Eric Blake, 2018/10/05
- Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook, Vladimir Sementsov-Ogievskiy, 2018/10/05
[Qemu-devel] [PATCH v3 17/18] block/backup: tiny refactor backup_job_create, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 11/18] iotests: allow resume_drive by node name, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 07/18] block/backup: allow use existent copy-bitmap, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 16/18] iotests: test new fleecing-hook driver in context of 222 iotest, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 18/18] block/backup: use fleecing-hook instead of write notifiers, Vladimir Sementsov-Ogievskiy, 2018/10/01
- Re: [Qemu-devel] [PATCH v3 18/18] block/backup: use fleecing-hook instead of write notifiers,
Vladimir Sementsov-Ogievskiy <=
[Qemu-devel] [PATCH v3 15/18] qapi: add x-drop-fleecing qmp command, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 09/18] block: improve should_update_child, Vladimir Sementsov-Ogievskiy, 2018/10/01
[Qemu-devel] [PATCH v3 12/18] iotests: prepare 055 to graph changes during backup job, Vladimir Sementsov-Ogievskiy, 2018/10/01
Re: [Qemu-devel] [PATCH v3 00/18] fleecing-hook driver for backup, Eric Blake, 2018/10/02