[CRIU] [RFC PATCH 02/16] criu: pagemap: make advance a public method
Mike Rapoport
rppt at linux.vnet.ibm.com
Tue Sep 27 06:42:03 PDT 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 705a9af..78d7db2 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 49362e3..2fc5f83 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -492,6 +492,7 @@ int open_page_read_at(int dfd, int id, 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