[CRIU] [PATCH 0/5]v2 work dir
Pavel Emelyanov
xemul at parallels.com
Fri Nov 15 10:19:42 PST 2013
On 11/16/2013 02:00 AM, Ruslan Kuprieiev wrote:
> On 15.11.2013 21:49, Pavel Emelyanov wrote:
>> On 11/15/2013 11:04 PM, Ruslan Kuprieiev wrote:
>>> This set of patches will allow us to specifie work directory where
>>> pidfiles/logs/stats are placed. We will also save one service fd.
>>>
>>> Ruslan Kuprieiev (5):
>>> crtools: add --work-dir(-W) option
>>> image: add dir parameter to open_image_dir()
>>> log: get rid of LOG_DIR_FD_OFF and opening cwd in log_init()
>>> crtools: chdir to work directory
>>> page-server/service: do not chdir / when going daemon
>>>
>>> cr-restore.c | 1 -
>>> cr-service.c | 6 ++----
>>> crtools.c | 38 ++++++++++++++++++++++++++------------
>>> image.c | 6 +++---
>>> include/image.h | 2 +-
>>> include/servicefd.h | 1 -
>>> log.c | 26 ++------------------------
>>> page-xfer.c | 2 +-
>>> 8 files changed, 35 insertions(+), 47 deletions(-)
>>>
>>
>> OK, applied. One thing to fix on top -- stats files should written to work dir,
>> not images dir as they are now.
> Oh, i'm not sure how to do it with all that magic=).
No magic, just use the open_image_at() call for stats.
> Could you, please, explain me, for example, this:
>
> struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
> FD_ENTRY(INVENTORY, "inventory"),
> ..........................................................,
>
> [CR_FD_STATS] = {
> .fmt = "stats-%s",
> .magic = STATS_MAGIC,
> },
> };
An array of templates is filled with values.
> .
>
More information about the CRIU
mailing list