Re: [Qemu-devel] [PATCH 08/12] dirty-bitmap: Change bdrv_get_dirty() to take bytes

2017-04-12 Thread Eric Blake
On 04/12/2017 07:25 PM, John Snow wrote: >> +++ b/migration/block.c >> @@ -537,8 +537,7 @@ static int mig_save_device_dirty(QEMUFile *f, >> BlkMigDevState *bmds, >> } else { >> blk_mig_unlock(); >> } >> -if (bdrv_get_dirty(bs, bmds->dirty_bitmap, sector)) {

Re: [Qemu-devel] [PATCH 08/12] dirty-bitmap: Change bdrv_get_dirty() to take bytes

2017-04-12 Thread John Snow
On 04/12/2017 01:49 PM, Eric Blake wrote: > Half the callers were already scaling bytes to sectors; the other > half can eventually be simplified to use byte iteration. Both > callers were already using the result as a bool, so make that > explicit. Making the change also makes it easier for a

[Qemu-devel] [PATCH 08/12] dirty-bitmap: Change bdrv_get_dirty() to take bytes

2017-04-12 Thread Eric Blake
Half the callers were already scaling bytes to sectors; the other half can eventually be simplified to use byte iteration. Both callers were already using the result as a bool, so make that explicit. Making the change also makes it easier for a future dirty-bitmap patch to offload scaling over to