[CRIU] [PATCH 04/18] fsnotify: inotify -- Add dumping of optional fields
Cyrill Gorcunov
gorcunov at openvz.org
Mon Jan 14 04:28:11 EST 2013
On Mon, Jan 14, 2013 at 01:13:40PM +0400, Pavel Emelyanov wrote:
> > @@ -928,6 +928,8 @@ int parse_fdinfo(int fd, int type,
> >
> > fsnotify_wd_entry__init(&entry.fsy);
> > entry.fsy.f_handle = &f_handle;
> > + entry.fsy.has_type = true;
> > + entry.fsy.type = FSNOTIFY_TYPE__INOTIFY;
> >
> > if (type != FD_TYPES__FSNOTIFY)
> > goto parse_err;
>
> Why is the same field initialized two times? Here and in dump_one_fsnotify?
These are dumped to different files and different entries. Look, we have two
files "inotify.img" and "inotify-wd.img" (which we can't rename unfortunately
to fsnotify). The first one consists of FsnotifyFileEntry entries and the second
is filled with FsnotifyWdEntry entries.
So, when we parse procfs we barely fill FsnotifyWdEntry which has own @type of
which kind of descriptor it carry. In dump_one_fsnotify we fulfil FsnotifyFileEntry.
So I somehow miss which field you referring here?
Cyrill
More information about the CRIU
mailing list