On 16/02/2016 08:17, Fam Zheng wrote:
>> @@ -321,8 +339,9 @@ static int set_dirty_tracking(void)
>>      int ret;
>>  
>>      QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
>> +        /* Creating/dropping dirty bitmaps only requires the big QEMU lock. 
>>  */
> 
> Why? I don't think it is safe today.  The BDS state is mutated and it can race
> with bdrv_set_dirty() etc.

You're completely right.

> (Also the refresh_total_sectors in bdrv_nb_sectors
> can even do read/write, no?)

refresh_total_sectors will just do a lseek(SEEK_END) basically.  So
that's safe.

Paolo

Reply via email to