Commit a90172df authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

reg-files: Don't mangle ghost directories

Because directories are opened via direct mkdir
call with name taken from ghost path don't postfix
it with cr.%x.ghost, otherwise that's the name
directory will have after restore complete causing
cwd01 test to fail.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 406b6b42
......@@ -173,6 +173,9 @@ static int open_remap_ghost(struct reg_file_info *rfi,
gf->dev = gfe->dev;
gf->ino = gfe->ino;
if (S_ISDIR(gfe->mode))
strncpy(gf->remap.path, rfi->path, PATH_MAX);
else
snprintf(gf->remap.path, PATH_MAX, "%s.cr.%x.ghost", rfi->path, rfe->remap_id);
if (create_ghost(gf, gfe, root, img))
......
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