13.04.2018 21:02, John Snow wrote:

On 04/13/2018 08:01 AM, Vladimir Sementsov-Ogievskiy wrote:
1. It looks unsafe to use nbd server + backup(sync=none) on same node,
synchronization is needed, like in block/replication, which uses
backup_wait_for_overlapping_requests, backup_cow_request_begin,
backup_cow_request_end. We have a filter driver for this thing, not yet
in upstream.
Is it the case that blockdev-backup sync=none can race with read
requests on the NBD server?

i.e. we can get temporarily inconsistent data before the COW completes?
Can you elaborate?
I'm not sure but looks possible:

1. start NBD read, find that there is a hole in temporary image, decide
to read from active image (or even start read) and yield
2. guest writes to the same are (COW happens, but it doesn't help)
3. reduce point (1.), read invalid (already updated by 2.) data

And similar place in block/replication, which uses backup(sync=none) too
is protected from such situation.
I'll have to look into this one -- were you seeing problems in practice
before you implemented your proprietary filter node?


I didn't see problems, I just noted, that it is done in block/replication and looked through corresponding commit messages.

Best regards,

libvir-list mailing list

Reply via email to