[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 06/13] migration/rdma: Create rdma_control_save_page()
From: |
Zhijian Li (Fujitsu) |
Subject: |
Re: [PATCH v3 06/13] migration/rdma: Create rdma_control_save_page() |
Date: |
Fri, 13 Oct 2023 08:05:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 12/10/2023 04:35, Juan Quintela wrote:
> 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>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
[...]
>
> +int rdma_control_save_page(QEMUFile *f, ram_addr_t block_offset,
> + ram_addr_t offset, size_t size)
> +{
> + if (!migrate_rdma()) {
> + return RAM_SAVE_CONTROL_NOT_SUPP;
> + }
> +
> + int ret = qemu_rdma_save_page(f, block_offset, offset, size);
> +
> + if (ret != RAM_SAVE_CONTROL_DELAYED &&
> + ret != RAM_SAVE_CONTROL_NOT_SUPP) {
> + if (ret < 0) {
> + qemu_file_set_error(f, ret);
> + }
> + }
> + return ret;
> +}
> +
> +
Redundant new line?
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
> static void rdma_accept_incoming_migration(void *opaque);
>
> static void rdma_cm_poll_handler(void *opaque)
> @@ -3989,7 +4008,6 @@ static const QEMUFileHooks rdma_read_hooks = {
> };
>
> static const QEMUFileHooks rdma_write_hooks = {
> - .save_page = qemu_rdma_save_page,
> };
>
>
- [PATCH v3 00/13] Removal of QEMUFileHooks, Juan Quintela, 2023/10/11
- [PATCH v3 01/13] migration: Create migrate_rdma(), Juan Quintela, 2023/10/11
- [PATCH v3 03/13] migration/rdma: Unfold ram_control_after_iterate(), Juan Quintela, 2023/10/11
- [PATCH v3 04/13] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, Juan Quintela, 2023/10/11
- [PATCH v3 05/13] migration/rdma: Unfold hook_ram_load(), Juan Quintela, 2023/10/11
- [PATCH v3 06/13] migration/rdma: Create rdma_control_save_page(), Juan Quintela, 2023/10/11
- Re: [PATCH v3 06/13] migration/rdma: Create rdma_control_save_page(),
Zhijian Li (Fujitsu) <=
- [PATCH v3 07/13] qemu-file: Remove QEMUFileHooks, Juan Quintela, 2023/10/11
- [PATCH v3 09/13] migration/rdma: Remove qemu_ prefix from exported functions, Juan Quintela, 2023/10/11
- [PATCH v3 02/13] migration/rdma: Unfold ram_control_before_iterate(), Juan Quintela, 2023/10/11
- [PATCH v3 08/13] migration/rdma: Move rdma constants from qemu-file.h to rdma.h, Juan Quintela, 2023/10/11
- [PATCH v3 11/13] migration/rdma: Use i as for index instead of idx, Juan Quintela, 2023/10/11