Skip to content

Commit

Permalink
migration/ram: Remove RAMState from xbzrle_cache_zero_page
Browse files Browse the repository at this point in the history
'rs' is not used in that function. It's a leftover from commit
9360447 ("ram: Use MigrationStats for statistics").

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231011184604.32364-4-farosas@suse.de>
  • Loading branch information
Fabiano Rosas authored and Juan Quintela committed Oct 16, 2023
1 parent 4a400d4 commit 2a278c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions migration/ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ void mig_throttle_counter_reset(void)
/**
* xbzrle_cache_zero_page: insert a zero page in the XBZRLE cache
*
* @rs: current RAM state
* @current_addr: address for the zero page
*
* Update the xbzrle cache to reflect a page that's been sent as all 0.
Expand All @@ -579,7 +578,7 @@ void mig_throttle_counter_reset(void)
* As a bonus, if the page wasn't in the cache it gets added so that
* when a small write is made into the 0'd page it gets XBZRLE sent.
*/
static void xbzrle_cache_zero_page(RAMState *rs, ram_addr_t current_addr)
static void xbzrle_cache_zero_page(ram_addr_t current_addr)
{
/* We don't care if this fails to allocate a new cache page
* as long as it updated an old one */
Expand Down Expand Up @@ -2146,7 +2145,7 @@ static int ram_save_target_page_legacy(RAMState *rs, PageSearchStatus *pss)
*/
if (rs->xbzrle_started) {
XBZRLE_cache_lock();
xbzrle_cache_zero_page(rs, block->offset + offset);
xbzrle_cache_zero_page(block->offset + offset);
XBZRLE_cache_unlock();
}
return res;
Expand Down

0 comments on commit 2a278c4

Please sign in to comment.