From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932481AbbIDOUu (ORCPT ); Fri, 4 Sep 2015 10:20:50 -0400 Received: from smtprelay0254.hostedemail.com ([216.40.44.254]:45085 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758990AbbIDOUt convert rfc822-to-8bit (ORCPT ); Fri, 4 Sep 2015 10:20:49 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::,RULES_HIT:41:152:355:379:541:599:800:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2689:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6119:6261:7514:7875:7903:9025:10004:10400:10848:10967:11232:11257:11658:11914:12043:12291:12438:12517:12519:12683:12740:13069:13161:13229:13311:13357:14096:14097:14106:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: gate45_410c17491ea34 X-Filterd-Recvd-Size: 2743 Date: Fri, 4 Sep 2015 10:20:45 -0400 From: Steven Rostedt To: =?UTF-8?B?UmFwaGHDq2w=?= Beamonte Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Matt Fleming Subject: Re: [PATCH 11/15] tools lib api: Add mount support for fs Message-ID: <20150904102045.0c8ca5c9@gandalf.local.home> In-Reply-To: References: <1441180605-24737-1-git-send-email-jolsa@kernel.org> <1441180605-24737-12-git-send-email-jolsa@kernel.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Sep 2015 10:14:28 -0400 Raphaƫl Beamonte wrote: > 2015-09-02 3:56 GMT-04:00 Jiri Olsa : > > 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@git.kernel.org > > Signed-off-by: Jiri Olsa > > --- > > 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. > tracefs and debugfs have known locations to be mounted at. That's why the kernel supplies it (/sys/kernel/debug and /sys/kernel/trace). Why should we bother the user with this? trace-cmd does the same thing. It automatically mounts the filesystems if they are not mounted. Would you rather have the tool fail and say "please mount the trace or debugfs file system"? Even if it asked before doing so, that would become rather annoying. Running perf and trace-cmd should just work, and not expect the user to do more work than can be easily done by the tool. -- Steve