[PATCH 7/7] rlimit: Move CR_FD_RLIMIT out of _CR_FD_TASK

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 13 03:24:50 PDT 2014


This image is deprecated now so move it out of
_CR_FD_TASK thus we won't be even generating it
on the dump.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-show.c            | 10 ++++++++++
 include/image-desc.h |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/cr-show.c b/cr-show.c
index 8f808bcbcb47..191cc638129c 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -443,6 +443,16 @@ static int cr_show_pstree_item(struct pstree_item *item)
 			cr_parse_fd(fdset_fd(cr_fdset, i), fdset_template[i].magic);
 		}
 
+	i = open_image(CR_FD_RLIMIT, O_SHOW | O_OPT, item->pid.virt);
+	if (i >= 0) {
+		pr_msg("* ");
+		pr_msg(fdset_template[CR_FD_RLIMIT].fmt, item->pid.virt);
+		pr_msg(":\n");
+
+		cr_parse_fd(i, RLIMIT_MAGIC);
+		close(i);
+	}
+
 	if (pb_read_one(fdset_fd(cr_fdset, CR_FD_IDS), &ids, PB_IDS) > 0) {
 		i = open_image(CR_FD_FDINFO, O_SHOW, ids->files_id);
 		if (i >= 0) {
diff --git a/include/image-desc.h b/include/image-desc.h
index 457b6dc6b96e..84ad2c02a01e 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -20,7 +20,6 @@ enum {
 	CR_FD_POSIX_TIMERS,
 	CR_FD_CREDS,
 	CR_FD_FS,
-	CR_FD_RLIMIT,
 	CR_FD_SIGNAL,
 	_CR_FD_TASK_TO,
 
@@ -86,6 +85,7 @@ enum {
 	CR_FD_VMAS,
 	CR_FD_PAGES_OLD,
 	CR_FD_SHM_PAGES_OLD,
+	CR_FD_RLIMIT,
 
 	CR_FD_IRMAP_CACHE,
 
-- 
1.8.3.1


--gj572EiMnwbLXET9--


More information about the CRIU mailing list