[CRIU] [PATCH] LOG_DIR_FD_OFF -> WORK_DIR_FD_OFF

Pavel Emelyanov xemul at parallels.com
Mon Nov 11 02:53:02 PST 2013


>> I suggest to remove LOG_DIR_FD_OFF at all.
> 
> Good point again. We have discussed all this policy with Pavel some time 
> ago, and now I am confused... Pavel?

That's the model we're trying to achieve:

We have 3 types of files CRIU wants to create

- images
- logs (there are many of them, min the per-pid logs option)
- pidfile(s)

We have 3 modes of CRIU operation

- run from shell
- service/page-server --daemon
- service worker (task that acts on RPC request)

Now this is how files are created in each:

* run from shell

- images  : -D option or $cwd
- logs    : $opt-filename
- pidfiles: $opt-filename

* service/page-server --daemon
g
- images  : -D, don't start if absent
- logs    : $opt-filename, don't start if not absolute
- pidfiles: $opt-filename, don't start if not absolute

* service worker

- images  : FD from request
- logs    : name from request, relative to requestor's FS
- pidfiles: name from request, relative to requestor's FS

In any case introducing WORK_DIR_FD_OFF makes things simpler.
Does this suit all the parties?


More information about the CRIU mailing list