Commit 71c9a7a9 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

page-xfer: Don't send zero pages if none found

When page-server gets a request for an absent pagemap from lazy-pages
daemon, it should not reply with "zero pages"'.

The pagemap should be completely in sync between src and dst and dst
should never request pages that are not present. Maybe we should return
-1 here? At least we'll have a chance that dump will unroll everything...
Acked-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f2f5fd68
......@@ -715,10 +715,8 @@ static int page_server_get_pages(int sk, struct page_server_iov *pi)
*/
if (pi->nr_pages == 0) {
/* no iovs found means we've hit a zero page */
pr_debug("no iovs found, zero pages\n");
pi->cmd = encode_ps_cmd(PS_IOV_ADD_F, 0);
return send_psi(sk, pi);
return -1;
}
pi->cmd = encode_ps_cmd(PS_IOV_ADD_F, PE_PRESENT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment