Re: [PATCH 11/15] tools lib api: Add mount support for fs

From: Steven Rostedt
Date: Fri Sep 04 2015 - 10:57:21 EST


On Fri, 4 Sep 2015 16:26:31 +0200
Jiri Olsa <jolsa@xxxxxxxxxx> wrote:

> On Fri, Sep 04, 2015 at 10:14:28AM -0400, RaphaÃl Beamonte wrote:
> > 2015-09-02 3:56 GMT-04:00 Jiri Olsa <jolsa@xxxxxxxxxx>:
> > > Adding name__mount (where name is in sysfs,procfs,debugfs,tracefs)
> > > interface that tries to mount the filesystem in case no mount is found.
> > >
> > > Link: http://lkml.kernel.org/n/tip-ja49vwfiq2qqkmoxx9yk26lm@xxxxxxxxxxxxxx
> > > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> > > ---
> > > tools/lib/api/fs/fs.c | 44 +++++++++++++++++++++++++++++++++++++++-----
> > > tools/lib/api/fs/fs.h | 15 +++++++++++----
> > > 2 files changed, 50 insertions(+), 9 deletions(-)
> >
> > Why automatic mounting the **fs filesystems?
> > Isn't it better to let the user decide when and where to mount it if
> > s/he forgot to do it before? Forcing a mount is also potentially
> > forcing to umount then mount when mounting has been forgotten before.
>
> well, I guess at some point we decided this was a good idea
> to make perf more user friendly
>
> AFAICS we do this only for debugfs and tracefs.. procfs
> and sysfs are mounted most of the time anyway

Note, if sysfs isn't already mounted, than nothing will get mounted by
perf. As sysfs is a requirement to get to /sys/kernel/trace and debug.


>
> we could track and unmount on exit, but I'd say let's have
> someone complaining about it first ;-)
>

Agreed. Although, I use perf/trace-cmd to mount that directory for
me :-)

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/