[CRIU] [PATCH 2/2 v4] fsnotify: Always provide the path for inotify watchees
Cyrill Gorcunov
gorcunov at gmail.com
Mon Oct 19 03:14:25 PDT 2015
On Mon, Oct 19, 2015 at 12:57:35PM +0300, Pavel Emelyanov wrote:
> > +
> > + fd = userns_call(open_by_handle, UNS_FDOUT, &handle,
> > + sizeof(handle), mntfd);
>
> Turn from open_by_handle into userns_call deserves separate patch and explanation.
It was there all the time, not introduced by me, I simply reuse this call.
> > + if ((m->fstype->code != FSTYPE__TMPFS) &&
> > + (m->fstype->code != FSTYPE__DEVTMPFS)) {
> > + if (!opts.force_irmap)
> > + goto out_nopath;
> > + else
> > + goto force_irmap;
> > + }
>
> So this WHOLE loop is for a single thing -- handle path resolve for tmpfs mounts. Right?
Yeah, exactly!
> > + pr_debug("\t\t\tlink as %s\n", __path);
> >
> > - if (read_fd_link(fd, p, sizeof(p)) < 0)
> > - goto err;
> > + mntfd = mntns_get_root_by_mnt_id(m->mnt_id);
>
> Why not just "m->nsid" dereference?
Good point. But this is just an optimisatio, may I do it on top?
Cyrill
More information about the CRIU
mailing list