[CRIU] Re: Rework open_proc() and friends
Cyrill Gorcunov
gorcunov at openvz.org
Thu Feb 16 17:02:06 EST 2012
On Fri, Feb 17, 2012 at 01:39:31AM +0400, Kir Kolyshkin wrote:
> This epic series tries to simplify the way we work with /proc/PID files,
> and it tries to do that gradually. That essentially means that if you
> do not like the last patch, you can still enjoy the first four.
>
> DISCLAIMER: while the code looks correct, it has only been
> tested by gcc and my eyes; i.e. I haven't run it.
>
> Patches are:
>
> * [PATCH 1/5] dump_one_task(): do not leak opened pid_dir fd
> Just a bug fix, must have.
>
> * [PATCH 2/5] util.c: introduce open_proc_rw()
> Adds open_proc_rw() in addition to open_proc() so
> they both will reuse the same goodies coming in later patches
>
> * [PATCH 3/5] parasite_infect_seized(): use open_proc_rw()
> Makes use of open_proc_rw()
>
> * [PATCH 4/5] Move error reporting to inside open_proc and friends
> Main patch in the series, it unifies error reporting and makes
> all functions to pass both pid and pid_dir. pid is needed for error
> reporting, pid_dir for openat() optimization.
>
> * [PATCH 5/5] open_proc() and friends: hide pid_dir
> This one is pretty controversial, it removes pid_dir from everywhere
> but the openat() optimization is still there. I am not sure it is
> worth merging (eager to hear your thoughts), but hey it looks pretty.
>
Thanks a lot, Kir! Series looks pretty good to me! (I'll wait
for Pavel's ack since he introduced this helpers in first place).
Cyrill
More information about the CRIU
mailing list