Skip to content

Commit

Permalink
mount: debug error in make_yard
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
  • Loading branch information
Snorch committed Apr 16, 2024
1 parent 1a4c103 commit 7c6d053
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion criu/cgroup.c
Expand Up @@ -1887,8 +1887,10 @@ static int prepare_cgroup_sfd(CgroupEntry *ce)
return -1;
}

if (make_yard(cg_yard))
if (make_yard(cg_yard)) {
pr_err("DEBUG[%s]: Failed to mount tmpfs on %s\n", __func__, cg_yard);
return -1;
}
}

pr_debug("Opening %s as cg yard\n", cg_yard);
Expand Down
12 changes: 9 additions & 3 deletions criu/mount-v2.c
Expand Up @@ -762,8 +762,10 @@ static int do_mount_one_v2(struct mount_info *mi)

static int populate_mnt_ns_v2(void)
{
if (make_yard(mnt_roots))
if (make_yard(mnt_roots)) {
pr_err("DEBUG[%s]: Failed to mount tmpfs on %s\n", __func__, mnt_roots);
return -1;
}

if (mnt_tree_for_each(root_yard_mp, do_mount_one_v2))
return -1;
Expand Down Expand Up @@ -1137,8 +1139,10 @@ static int get_empty_mntns(void)
goto err;
}

if (make_yard(mnt_roots))
if (make_yard(mnt_roots)) {
pr_err("DEBUG[%s]: Failed to mount tmpfs on %s\n", __func__, mnt_roots);
goto err;
}

if (cr_pivot_root(mnt_roots))
goto err;
Expand Down Expand Up @@ -1194,8 +1198,10 @@ static int pre_create_mount_namespaces(void)
goto err;
}

if (make_yard(mnt_roots))
if (make_yard(mnt_roots)) {
pr_err("DEBUG[%s]: Failed to mount tmpfs on %s\n", __func__, mnt_roots);
goto err;
}

print_ns_root(nsid, 0, path, sizeof(path));
if (mkdir(path, 0600)) {
Expand Down
4 changes: 3 additions & 1 deletion criu/mount.c
Expand Up @@ -3512,8 +3512,10 @@ static int populate_roots_yard(struct mount_info *cr_time)
char path[PATH_MAX];
struct ns_id *nsid;

if (make_yard(mnt_roots))
if (make_yard(mnt_roots)) {
pr_err("DEBUG[%s]: Failed to mount tmpfs on %s\n", __func__, mnt_roots);
return -1;
}

for (nsid = ns_ids; nsid != NULL; nsid = nsid->next) {
if (nsid->nd != &mnt_ns_desc)
Expand Down

0 comments on commit 7c6d053

Please sign in to comment.