[CRIU] [PATCH v4 2/7] mem: export should_dump_page() from mem.c

Eugene Batalov eabatalov89 at gmail.com
Thu Aug 11 07:53:52 PDT 2016


We'll use it to decide should we dump anon shmem page or not.
---
 criu/include/mem.h | 2 ++
 criu/mem.c         | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/criu/include/mem.h b/criu/include/mem.h
index 7f27454..1acc979 100644
--- a/criu/include/mem.h
+++ b/criu/include/mem.h
@@ -3,6 +3,7 @@
 
 #include <stdbool.h>
 #include "asm/int.h"
+#include "vma.pb-c.h"
 
 struct parasite_ctl;
 struct vm_area_list;
@@ -36,4 +37,5 @@ int open_vmas(struct pstree_item *t);
 int prepare_vmas(struct pstree_item *t, struct task_restore_args *ta);
 int unmap_guard_pages(struct pstree_item *t);
 int prepare_mappings(struct pstree_item *t);
+bool should_dump_page(VmaEntry *vmae, u64 pme);
 #endif /* __CR_MEM_H__ */
diff --git a/criu/mem.c b/criu/mem.c
index d222535..3e85910 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -80,7 +80,7 @@ unsigned int dump_pages_args_size(struct vm_area_list *vmas)
 		(vmas->priv_size + 1) * sizeof(struct iovec);
 }
 
-static inline bool should_dump_page(VmaEntry *vmae, u64 pme)
+bool should_dump_page(VmaEntry *vmae, u64 pme)
 {
 #ifdef CONFIG_VDSO
 	/*
-- 
1.9.1



More information about the CRIU mailing list