[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/11] dump: Remove is_zero_page()
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH 02/11] dump: Remove is_zero_page() |
Date: |
Sun, 21 Nov 2021 23:30:34 +0400 |
On Fri, Nov 19, 2021 at 8:59 PM Juan Quintela <quintela@redhat.com> wrote:
>
> It just calls buffer_is_zero(). Just change the callers.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> dump/dump.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/dump/dump.c b/dump/dump.c
> index 662d0a62cd..a84d8b1598 100644
> --- a/dump/dump.c
> +++ b/dump/dump.c
> @@ -1293,14 +1293,6 @@ static size_t get_len_buf_out(size_t page_size,
> uint32_t flag_compress)
> return 0;
> }
>
> -/*
> - * check if the page is all 0
> - */
> -static inline bool is_zero_page(const uint8_t *buf, size_t page_size)
> -{
> - return buffer_is_zero(buf, page_size);
> -}
> -
> static void write_dump_pages(DumpState *s, Error **errp)
> {
> int ret = 0;
> @@ -1357,7 +1349,7 @@ static void write_dump_pages(DumpState *s, Error **errp)
> */
> while (get_next_page(&block_iter, &pfn_iter, &buf, s)) {
> /* check zero page */
> - if (is_zero_page(buf, s->dump_info.page_size)) {
> + if (buffer_is_zero(buf, s->dump_info.page_size)) {
> ret = write_cache(&page_desc, &pd_zero, sizeof(PageDescriptor),
> false);
> if (ret < 0) {
> --
> 2.33.1
>
- Re: [PATCH 01/11] migration: Remove is_zero_range(), (continued)
- [PATCH 06/11] migration: Move iov from pages to params, Juan Quintela, 2021/11/19
- [PATCH 05/11] multifd: Make zlib compression method not use iovs, Juan Quintela, 2021/11/19
- [PATCH 07/11] multifd: Make zlib use iov's, Juan Quintela, 2021/11/19
- [PATCH 04/11] multifd: Make zstd compression method not use iovs, Juan Quintela, 2021/11/19
- [PATCH 08/11] multifd: Make zstd use iov's, Juan Quintela, 2021/11/19
- [PATCH 02/11] dump: Remove is_zero_page(), Juan Quintela, 2021/11/19
- [PATCH 09/11] multifd: Remove send_write() method, Juan Quintela, 2021/11/19