[CRIU] [PATCHv2 1/9] vma: rename longest to priv_longest
Eugene Batalov
eabatalov89 at gmail.com
Tue Dec 22 07:22:46 PST 2015
From: Fyodor Bocharov <bocharovfedor at gmail.com>
'longest' field in vma_area_list struct stands for longest private vma so
it would better name priv_longest -- same as priv_size.
Signed-off-by: Fyodor Bocharov <fbocharov at yandex.ru>
Signed-off-by: Eugene Batalov <eabatalov89 at gmail.com>
---
cr-dump.c | 2 +-
include/vma.h | 4 ++--
mem.c | 4 ++--
proc_parse.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/cr-dump.c b/cr-dump.c
index fabf20a..16938ec 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -128,7 +128,7 @@ int collect_mappings(pid_t pid, struct vm_area_list *vma_area_list)
if (ret < 0)
goto err;
- pr_info("Collected, longest area occupies %lu pages\n", vma_area_list->longest);
+ pr_info("Collected, longest area occupies %lu pages\n", vma_area_list->priv_longest);
pr_info_vma_list(&vma_area_list->h);
pr_info("----------------------------------------\n");
diff --git a/include/vma.h b/include/vma.h
index 6c28136..fcd3d0e 100644
--- a/include/vma.h
+++ b/include/vma.h
@@ -12,7 +12,7 @@ struct vm_area_list {
unsigned nr;
unsigned int nr_aios;
unsigned long priv_size; /* nr of pages in private VMAs */
- unsigned long longest; /* nr of pages in longest VMA */
+ unsigned long priv_longest; /* nr of pages in longest private VMA */
};
#define VM_AREA_LIST(name) struct vm_area_list name = { .h = LIST_HEAD_INIT(name.h), .nr = 0, }
@@ -22,7 +22,7 @@ static inline void vm_area_list_init(struct vm_area_list *vml)
INIT_LIST_HEAD(&vml->h);
vml->nr = 0;
vml->priv_size = 0;
- vml->longest = 0;
+ vml->priv_longest = 0;
}
struct file_desc;
diff --git a/mem.c b/mem.c
index 989efc3..02399fc 100644
--- a/mem.c
+++ b/mem.c
@@ -256,14 +256,14 @@ static int __parasite_dump_pages_seized(struct parasite_ctl *ctl,
timing_start(TIME_MEMDUMP);
pr_debug(" Private vmas %lu/%lu pages\n",
- vma_area_list->longest, vma_area_list->priv_size);
+ vma_area_list->priv_longest, vma_area_list->priv_size);
/*
* Step 0 -- prepare
*/
if (pmc_init(&pmc, ctl->pid.real, &vma_area_list->h,
- vma_area_list->longest * PAGE_SIZE))
+ vma_area_list->priv_longest * PAGE_SIZE))
return -1;
ret = -1;
diff --git a/proc_parse.c b/proc_parse.c
index 2eef21a..008327d 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -494,7 +494,7 @@ static int vma_list_add(struct vma_area *vma_area,
pages = vma_area_len(vma_area) / PAGE_SIZE;
vma_area_list->priv_size += pages;
- vma_area_list->longest = max(vma_area_list->longest, pages);
+ vma_area_list->priv_longest = max(vma_area_list->priv_longest, pages);
}
*prev_vfi = *vfi;
@@ -517,7 +517,7 @@ int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list)
vma_area_list->nr = 0;
vma_area_list->nr_aios = 0;
- vma_area_list->longest = 0;
+ vma_area_list->priv_longest = 0;
vma_area_list->priv_size = 0;
INIT_LIST_HEAD(&vma_area_list->h);
--
1.9.1
More information about the CRIU
mailing list