2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 16:55:43 +00:00

mount: Add abstraction layer for dumping file systems (v2)

We need to dump content of some fs like binfmt_misc, tmpfs, ... To facilitate
this the existing list of filesystems is turned into an array of structures
with dump and restore callbacks. Each FS may declare them they need.

v2: rework encode/decode_fstype not to do it twice.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2012-08-09 16:27:30 +04:00
committed by Pavel Emelyanov
parent 0b5425b634
commit 6949a848d3
4 changed files with 45 additions and 22 deletions

View File

@@ -90,6 +90,13 @@ struct proc_status_creds {
uint32_t cap_bnd[PROC_CAP_SIZE];
};
struct mount_info;
struct fstype {
char *name;
int (*dump)(struct mount_info *pm);
int (*restore)(struct mount_info *pm);
};
struct mount_info {
int mnt_id;
int parent_mnt_id;
@@ -99,7 +106,7 @@ struct mount_info {
unsigned flags;
int master_id;
int shared_id;
char *fstype;
struct fstype *fstype;
char *source;
char *options;
struct mount_info *next;