[CRIU] [PATCH v4 01/17] fstype: add boolean stage flag to parse callback

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Jan 7 08:09:16 PST 2016


This flag will be used by autofs to skip parse on restore.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 include/proc_parse.h |    6 +++---
 mount.c              |    2 +-
 proc_parse.c         |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/proc_parse.h b/include/proc_parse.h
index bd5317b..711317b 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -114,7 +114,7 @@ struct fstype {
 	int code;
 	int (*dump)(struct mount_info *pm);
 	int (*restore)(struct mount_info *pm);
-	int (*parse)(struct mount_info *pm);
+	int (*parse)(struct mount_info *pm, bool for_dump);
 	mount_fn_t mount;
 };
 
@@ -207,10 +207,10 @@ extern void put_ctls(struct list_head *);
 int collect_controllers(struct list_head *cgroups, unsigned int *n_cgroups);
 
 /* callback for AUFS support */
-extern int aufs_parse(struct mount_info *mi);
+extern int aufs_parse(struct mount_info *mi, bool for_dump);
 
 /* callback for OverlayFS support */
-extern int overlayfs_parse(struct mount_info *mi);
+extern int overlayfs_parse(struct mount_info *mi, bool for_dump);
 
 int parse_children(pid_t pid, pid_t **_c, int *_n);
 
diff --git a/mount.c b/mount.c
index 9d5667a..f7df464 100644
--- a/mount.c
+++ b/mount.c
@@ -1164,7 +1164,7 @@ static int attach_option(struct mount_info *pm, char *opt)
 }
 
 /* Is it mounted w or w/o the newinstance option */
-static int devpts_parse(struct mount_info *pm)
+static int devpts_parse(struct mount_info *pm, bool for_dump)
 {
 	int ret;
 
diff --git a/proc_parse.c b/proc_parse.c
index ddb20de..32c4af5 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -1379,7 +1379,7 @@ struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid, bool for_dump)
 				new->flags, new->options);
 
 		if (new->fstype->parse) {
-			ret = new->fstype->parse(new);
+			ret = new->fstype->parse(new, for_dump);
 			if (ret) {
 				pr_err("Failed to parse FS specific data on %s\n",
 						new->mountpoint);
@@ -2305,7 +2305,7 @@ err:
  *
  * See fixup_overlayfs for details.
  */
-int overlayfs_parse(struct mount_info *new)
+int overlayfs_parse(struct mount_info *new, bool for_dump)
 {
 	opts.overlayfs = true;
 	return 0;
@@ -2315,7 +2315,7 @@ int overlayfs_parse(struct mount_info *new)
  * AUFS callback function to "fix up" the root pathname.
  * See sysfs_parse.c for details.
  */
-int aufs_parse(struct mount_info *new)
+int aufs_parse(struct mount_info *new, bool for_dump)
 {
 	int ret = 0;
 



More information about the CRIU mailing list