mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
migration/rdma: Create rdma_control_save_page()
The only user of ram_control_save_page() and save_page() hook was rdma. Just move the function to rdma.c, rename it to rdma_control_save_page(). Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231011203527.9061-7-quintela@redhat.com>
This commit is contained in:
parent
a6323300e8
commit
e493008d50
5 changed files with 30 additions and 35 deletions
|
@ -298,26 +298,6 @@ void qemu_fflush(QEMUFile *f)
|
|||
f->iovcnt = 0;
|
||||
}
|
||||
|
||||
int ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
|
||||
ram_addr_t offset, size_t size)
|
||||
{
|
||||
if (f->hooks && f->hooks->save_page) {
|
||||
int ret = f->hooks->save_page(f, block_offset, offset, size);
|
||||
/*
|
||||
* RAM_SAVE_CONTROL_* are negative values
|
||||
*/
|
||||
if (ret != RAM_SAVE_CONTROL_DELAYED &&
|
||||
ret != RAM_SAVE_CONTROL_NOT_SUPP) {
|
||||
if (ret < 0) {
|
||||
qemu_file_set_error(f, ret);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
return RAM_SAVE_CONTROL_NOT_SUPP;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attempt to fill the buffer from the underlying file
|
||||
* Returns the number of bytes read, or negative value for an error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue