Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
migration/rdma: Check sooner if we are in postcopy for save_page()
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-11-quintela@redhat.com>
  • Loading branch information
Juan Quintela committed May 30, 2023
1 parent aed056d commit d83da46
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions migration/rdma.c
Expand Up @@ -3250,10 +3250,6 @@ static int qemu_rdma_save_page(QEMUFile *f, ram_addr_t block_offset,
RDMAContext *rdma;
int ret;

if (migration_in_postcopy()) {
return RAM_SAVE_CONTROL_NOT_SUPP;
}

RCU_READ_LOCK_GUARD();
rdma = qatomic_rcu_read(&rioc->rdmaout);

Expand Down Expand Up @@ -3322,7 +3318,7 @@ static int qemu_rdma_save_page(QEMUFile *f, ram_addr_t block_offset,
int rdma_control_save_page(QEMUFile *f, ram_addr_t block_offset,
ram_addr_t offset, size_t size)
{
if (!migrate_rdma()) {
if (!migrate_rdma() || migration_in_postcopy()) {
return RAM_SAVE_CONTROL_NOT_SUPP;
}

Expand Down

0 comments on commit d83da46

Please sign in to comment.