[CRIU] [PATCH 08/18] fsnotify: Add try_open_handle helper
Pavel Emelyanov
xemul at parallels.com
Mon Jan 14 04:29:00 EST 2013
On 01/11/2013 08:58 PM, Cyrill Gorcunov wrote:
>
> The helper chooses which path to get, if remapped name present
> (a ghost file) we use it, otherwise we try to open file handle.
>
> The reason for separate helper is that both inotify and fanotify
> will use it, so we should try to eliminate code duplication.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> fsnotify.c | 65 +++++++++++++++++++++++++++++++++++++++-----------------------
> 1 file changed, 41 insertions(+), 24 deletions(-)
>
> -static int restore_one_fsnotify(int inotify_fd, struct fsnotify_wd_info *info)
> +static char *try_open_handle(const char *who, struct fsnotify_wd_info *info, char *buf, size_t size, int *target)
This routine is not intended to open anything, we expect it to
provide us a path we can feed into sys_inotify_add_watch. Thus
some better name is better.
> {
More information about the CRIU
mailing list