[CRIU] Re: [PATCH 4/5] Move error reporting to inside open_proc and friends

Pavel Emelyanov xemul at parallels.com
Fri Feb 17 07:33:30 EST 2012


On 02/17/2012 01:39 AM, Kir Kolyshkin wrote:
> ...and make it correctly print the file name we were unable to open.
> Also, error from fdopen[dir]() is now reported with file name as well.
> 
> Note that open_proc() and friends need to be macros in order for
> pr_perror() to show actual file name and line number where error occured.
> 
> Historical note: the original version of this patch was way more radical,
> changing openat() to open() and thus removing pid_dir (replacing with pid
> when needed) and open_proc_dir(), changing openat() to open(). The word
> from Pavel is he wants to keep the openat/pid_dir optimization because
> it saves two dentry lookups in kernel code for each open(). Because of
> this optimization (and desire to print correct file name in case
> of error) we have to carry both pid and pid_dir everywhere.
> 
> Signed-off-by: Kir Kolyshkin <kir at openvz.org>

Ack


More information about the CRIU mailing list