[CRIU] [PATCH 15/18] dump: Add dumping of fanotify objects
Pavel Emelyanov
xemul at parallels.com
Mon Jan 14 04:36:58 EST 2013
On 01/11/2013 08:58 PM, Cyrill Gorcunov wrote:
>
> Basically the idea is simple:
>
> - in main dumping routine dump_one_file with help
> of link type, we choose which dumper should run
> either one for inotify or for fanotidy
> - the rest of work is done by dump_one_fsnotify helper,
> which depending on notification type either calls
> for dump_one_inotify or for dump_one_fanotify
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> cr-dump.c | 4 ++-
> fsnotify.c | 80 ++++++++++++++++++++++++++++++++++++++++++++----------
> include/fsnotify.h | 3 +-
> 3 files changed, 71 insertions(+), 16 deletions(-)
>
> + if (!we->f_handle->bytes && !we->i_ino) {
> + struct mount_info *m;
> +
> + m = lookup_mnt_id(we->s_dev);
> + if (!m) {
> + pr_err("Can't find mnt_id %x\n", we->s_dev);
> + return -1;
> + }
> + we->s_dev = m->s_dev;
> + } else
> + we->has_mflags = true;
This is unpareable and I cannot find a single bit of logic here :(
More information about the CRIU
mailing list