mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
ghosts: Add comment about shared path allocation
Ghost remaps allocate path with shmalloc. Add comment why this is such. ✓ travis-ci: success for Sanitize initialization bits Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
2356e5ffc6
commit
23e092f709
@@ -259,6 +259,13 @@ static int collect_remap_ghost(struct reg_file_info *rfi,
|
|||||||
if (!gf)
|
if (!gf)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The rpath is shmalloc-ed because we create the ghost
|
||||||
|
* file in root task context and generate its path there.
|
||||||
|
* However the path should be visible by the criu task
|
||||||
|
* in order to remove the ghost files from root FS (see
|
||||||
|
* try_clean_remaps()).
|
||||||
|
*/
|
||||||
gf->remap.rpath = shmalloc(PATH_MAX);
|
gf->remap.rpath = shmalloc(PATH_MAX);
|
||||||
if (!gf->remap.rpath)
|
if (!gf->remap.rpath)
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user