Commit 43c96be7 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

Allow dumping of pstore, securityfs, fusectl, debugfs

These are mounted by default in ubuntu containers, so criu should know about
them and remount them on restore.
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 72a9372a
......@@ -727,6 +727,37 @@ out:
return ret;
}
static int dump_empty_fs(struct mount_info *pm)
{
int fd, ret = -1;
struct dirent *de;
DIR *fdir = NULL;
fd = open_mountpoint(pm);
if (fd < 0)
return -1;
fdir = fdopendir(fd);
if (fdir == NULL) {
close(fd);
return -1;
}
while ((de = readdir(fdir))) {
if (dir_dots(de))
continue;
pr_err("%s isn't empty: %s\n", pm->fstype->name, de->d_name);
goto out;
}
ret = 0;
out:
closedir(fdir);
return ret;
}
static struct fstype fstypes[] = {
{
.name = "unsupported",
......@@ -759,6 +790,20 @@ static struct fstype fstypes[] = {
}, {
.name = "btrfs",
.code = FSTYPE__UNSUPPORTED,
}, {
.name = "pstore",
.dump = dump_empty_fs,
.code = FSTYPE__PSTORE,
}, {
.name = "securityfs",
.code = FSTYPE__SECURITYFS,
}, {
.name = "fusectl",
.dump = dump_empty_fs,
.code = FSTYPE__FUSECTL,
}, {
.name = "debugfs",
.code = FSTYPE__DEBUGFS,
}
};
......
......@@ -7,6 +7,10 @@ enum fstype {
TMPFS = 5;
DEVPTS = 6;
SIMFS = 7;
PSTORE = 8;
SECURITYFS = 9;
FUSECTL = 10;
DEBUGFS = 11;
};
message mnt_entry {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment