dump: Remove is_zero_page()
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>
This commit is contained in:
parent
bad452a77e
commit
f13f22badc
10
dump/dump.c
10
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user