[CRIU] [PATCH v2 01/11] criu: pagemap: make advance a public method
Mike Rapoport
rppt at linux.vnet.ibm.com
Sun Nov 13 01:52:34 PST 2016
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
criu/include/pagemap.h | 4 +++-
criu/pagemap.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/criu/include/pagemap.h b/criu/include/pagemap.h
index 39227f2..e1cbc85 100644
--- a/criu/include/pagemap.h
+++ b/criu/include/pagemap.h
@@ -42,12 +42,14 @@
struct page_read {
/*
- * gets next vaddr:len pair to work on.
+ * Gets next vaddr:len pair to work on. The zero pagemaps are skipped.
* Pagemap entries should be returned in sorted order.
*/
int (*get_pagemap)(struct page_read *, struct iovec *iov);
/* reads page from current pagemap */
int (*read_pages)(struct page_read *, unsigned long vaddr, int nr, void *);
+ /* Advance page_read to the next entry (including zero pagemaps) */
+ int (*advance)(struct page_read *pr);
void (*close)(struct page_read *);
void (*skip_pages)(struct page_read *, unsigned long len);
int (*seek_page)(struct page_read *pr, unsigned long vaddr, bool warn);
diff --git a/criu/pagemap.c b/criu/pagemap.c
index a2f4c85..f73ca6a 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -516,6 +516,7 @@ int open_page_read_at(int dfd, int pid, struct page_read *pr, int pr_flags)
pr->get_pagemap = get_pagemap;
pr->read_pages = read_pagemap_page;
+ pr->advance = advance;
pr->close = close_page_read;
pr->skip_pages = skip_pagemap_pages;
pr->seek_page = seek_pagemap_page;
--
1.9.1
More information about the CRIU
mailing list