[CRIU] [PATCH 15/18] dump: Add dumping of fanotify objects
Cyrill Gorcunov
gorcunov at openvz.org
Mon Jan 14 04:53:03 EST 2013
On Mon, Jan 14, 2013 at 01:36:58PM +0400, Pavel Emelyanov wrote:
> > + 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 :(
The problem is that fanotify for mount points and inodes (while have
same general name "fanotify") do differ in format and arguments they
use. So I wanted to reuse existing FsnotifyWdEntry format for that.
Optionally I can think of distingushing notifications in protobuf
format itself (ie to have 3 types of records: inotify, fanotify-on-node,
fanotify-on-mount-point). I guess this would make code simplier from
one point of view, on another hands this bloats our codebase.
Would you prefer 3 types instead?
Cyrill
More information about the CRIU
mailing list