On 03/15/2018 07:47 PM, Dr. David Alan Gilbert wrote:
/* Check the pages is dirty and if it is send it */
if (migration_bitmap_clear_dirty(rs, pss->block, pss->page)) {
+ RAMBlock *block = pss->block;
+ ram_addr_t offset = pss->page << TARGET_PAGE_BITS;
+
+ if (control_save_page(rs, block, offset, &res)) {
+ goto page_saved;
OK, but I'd prefer if you avoided this forward goto; we do use goto but
we tend to keep it just for error cases.
There is a common operation, clearing unsentmap, for save_control,
save_zero, save_compressed and save_normal, if we do not use 'goto',
the operation would to be duplicated several times or we will have
big if...elseif...elseif... section.
So it may be not too bad to have 'goto' under this case? :)