[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: prohibit migration duri
From: |
John Snow |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: prohibit migration during transactions |
Date: |
Fri, 2 Oct 2015 14:20:00 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 10/01/2015 02:01 PM, Paolo Bonzini wrote:
>
>
> On 01/10/2015 18:34, John Snow wrote:
>> +
>> + error_setg(&blocker, "Block device(s) are in use by a Block
>> Transaction");
>
> s/Block Transaction/transaction command/
>
> But how can migration start during a transaction?
>
Well, it definitely can't now ! :)
This is actually more for the other case: The migration starts, and we
want to prohibit snapshots and transactions during that period. Together
with the patch this depends on, we accomplish that.
The workflow of snapshot/transaction-before-migration isn't currently
possible.
>> + ret = migrate_add_blocker(blocker, errp);
>> + if (ret < 0) {
>> + goto cleanup_mig;
>> + }
>>
>> QSIMPLEQ_HEAD(snap_bdrv_states, BlkTransactionState) snap_bdrv_states;
>> QSIMPLEQ_INIT(&snap_bdrv_states);
>> @@ -1814,6 +1823,9 @@ exit:
>> }
>> g_free(state);
>> }
>> + cleanup_mig:
>> + migrate_del_blocker(blocker);
>> + error_free(blocker);
>