[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/18] dump: Remove is_zero_page()
From: |
Juan Quintela |
Subject: |
[PULL 06/18] dump: Remove is_zero_page() |
Date: |
Wed, 15 Dec 2021 11:32:06 +0100 |
It just calls buffer_is_zero(). Just change the callers.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
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
- [PULL 00/18] Migration 20211214 patches, Juan Quintela, 2021/12/15
- [PULL 01/18] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache., Juan Quintela, 2021/12/15
- [PULL 03/18] Fixed a QEMU hang when guest poweroff in COLO mode, Juan Quintela, 2021/12/15
- [PULL 04/18] migration/colo: Optimize COLO primary node start code path, Juan Quintela, 2021/12/15
- [PULL 05/18] migration: Remove is_zero_range(), Juan Quintela, 2021/12/15
- [PULL 06/18] dump: Remove is_zero_page(),
Juan Quintela <=
- [PULL 08/18] migration: Never call twice qemu_target_page_size(), Juan Quintela, 2021/12/15
- [PULL 02/18] migration/colo: More accurate update checkpoint time, Juan Quintela, 2021/12/15
- [PULL 11/18] multifd: The variable is only used inside the loop, Juan Quintela, 2021/12/15
- [PULL 09/18] multifd: Rename used field to num, Juan Quintela, 2021/12/15
- [PULL 07/18] multifd: Delete useless operation, Juan Quintela, 2021/12/15
- [PULL 12/18] multifd: remove used parameter from send_prepare() method, Juan Quintela, 2021/12/15
- [PULL 10/18] multifd: Add missing documention, Juan Quintela, 2021/12/15
- [PULL 13/18] multifd: remove used parameter from send_recv_pages() method, Juan Quintela, 2021/12/15
- [PULL 14/18] multifd: Fill offset and block for reception, Juan Quintela, 2021/12/15
- [PULL 15/18] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated., Juan Quintela, 2021/12/15