[CRIU] Re: [PATCH cr] crtools: support any format of image path (v2)
Pavel Emelyanov
xemul at parallels.com
Mon Mar 19 02:31:24 EDT 2012
On 03/16/2012 11:47 PM, Andrey Vagin wrote:
>
> Now a name of an image file is hard coded ("smth-%d.img", pid),
> but the images of namespaces, shared memery, etc belong to
> not one task, so they may have other formats of names, which
> will describe objects.
>
> For example a image of shared memory content may have name like
> this ("pages-shmem-%ld.img", shmid)
>
> v2: fix comment
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> crtools.c | 38 ++++--------------------------
> include/crtools.h | 9 ++++--
> util.c | 67 +++++++++++++++++++++++++++++++++++++++++-----------
> 3 files changed, 64 insertions(+), 50 deletions(-)
>
Plz rebase on recent changes.
> @@ -198,49 +197,22 @@ static struct cr_fdset *cr_fdset_open(int pid, unsigned long use_mask,
> } else
> fdset = cr_fdset;
>
> - for (i = 0; i < CR_FD_MAX; i++) {
> + for (i = 0; i < CR_FD_PID_MAX; i++) {
Since this routine now opens per-task entries it's worth renaming it
this way.
And sanitize the namespaces' part respectively.
Thanks,
Pavel
More information about the CRIU
mailing list