diff options
author | Juan Quintela <quintela@redhat.com> | 2023-10-11 22:35:20 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-10-17 09:25:13 +0200 |
commit | e493008d504b3513e64f90e87924fd4b4a2f0751 (patch) | |
tree | feb2cb573bbfcb456f50779d1c048c546efc5da2 /migration/qemu-file.c | |
parent | a6323300e879558055948cb16ba6da52a9836869 (diff) |
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>
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r-- | migration/qemu-file.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 4a414b8976..745eaf7a5b 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -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. |