[CRIU] [PATCH 1/1] simplify the "ignore filesystem-subtype" logic
Tycho Andersen
tycho.andersen at canonical.com
Sat Apr 11 06:54:04 PDT 2015
On Fri, Apr 10, 2015 at 07:00:16PM +0200, Oleg Nesterov wrote:
> On 04/10, Tycho Andersen wrote:
> >
> > On Fri, Apr 10, 2015 at 06:24:50PM +0200, Oleg Nesterov wrote:
> > > We can simply overwrite the dot symbol right after the kernel reports
> > > it to us.
> >
> > I have no objections, although is it possible that we would ever want
> > this information? e.g. to pass to a plugin that knows how to unmount a
> > specific fuse filesystem?
>
> If we ever need to know the subtype, we need more changes anyway because
> this info is lost right after parse_mountinfo() calls parse_mountinfo_ent().
Good point:
Acked-by: Tycho Andersen <tycho.andersen at canonical.com>
> And in this case this part
>
> > > + /*
> > > + * The kernel reports "subtypes" sometimes and the valid
> > > + * type-vs-subtype delimiter is the dot symbol. We disregard
> > > + * any subtypes for the purpose of finding the fstype.
> > > + */
> > > + sub = strchr(*fsname, '.');
> > > + if (sub)
> > > + *sub = 0;
>
> can actually help because we can turn this code into
>
> sub = strchr(*fsname, '.');
> if (sub) {
> *sub++ = '0';
> new->fs_subtype = strdup(sub);
> }
>
> No?
>
>
> But again, again, I won't argue even if I am right (and I can be easily
> wrong). Cleanups are always subjective.
>
> Oleg.
>
More information about the CRIU
mailing list