Re: [Qemu-block] [PATCH v3 06/10] block/dirty-bitmap: explicitly lock bitmaps with successors

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > Instead of implying a user_locked/busy status, make it explicit. > Now, bitmaps in use by migration, NBD or backup operations > are all treated the same way with the same code paths. > > Signed-off-by: John Snow > Reviewed-by: Eric Blake hmm, you forget my

Re: [Qemu-block] [PATCH v3 05/10] nbd: change error checking order for bitmaps

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > Check that the bitmap is not in use prior to it checking if it is > not enabled/recording guest writes. The bitmap being busy was likely > at the behest of the user, so this error has a greater chance of being > understood by the user. > > Signed-off-by: John

Re: [Qemu-block] [PATCH v3 04/10] block/dirty-bitmap: change semantics of enabled predicate

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > Currently, the enabled predicate means something like: > "the QAPI status of the bitmap is ACTIVE." > After this patch, it should mean exclusively: > "This bitmap is recording guest writes, and is allowed to do so." > > In many places, this is how this

Re: [Qemu-block] [PATCH v3 03/10] block/dirty-bitmap: remove set/reset assertions against enabled bit

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
about subject: shouldn't it be "against disabled bit" instead? 23.02.2019 3:06, John Snow wrote: > bdrv_set_dirty_bitmap and bdrv_reset_dirty_bitmap are only used as an > internal API by the mirror and migration areas of our code. These > calls modify the bitmap, but do so at the behest of QEMU

Re: [Qemu-block] [PATCH v3 02/10] block/dirty-bitmaps: rename frozen predicate helper

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > "Frozen" was a good description a long time ago, but it isn't adequate now. > Rename the frozen predicate to has_successor to make the semantics of the > predicate more clear to outside callers. > > In the process, remove some calls to frozen() that no longer

Re: [Qemu-block] [PATCH v3 01/10] block/dirty-bitmap: add recording and busy properties

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > The current API allows us to report a single status, which we've defined as: > > Frozen: has a successor, treated as qmp_locked, may or may not be enabled. > Locked: no successor, qmp_locked. may or may not be enabled. > Disabled: Not frozen or locked,

Re: [Qemu-block] [PATCH 4/4] block/nbd-client: use non-blocking io channel for nbd negotiation

2019-02-24 Thread Vladimir Sementsov-Ogievskiy
19.02.2019 16:18, Vladimir Sementsov-Ogievskiy wrote: > 12.02.2019 1:02, Eric Blake wrote: >> On 2/11/19 6:56 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Now negotiation is done in coroutine, so to take benefit of it let's >>> use non-blocking model. >>> >>> Note that QIOChannel handle synchronous