From mboxrd@z Thu Jan 1 00:00:00 1970 From: guijianfeng@cn.fujitsu.com (Gui Jianfeng) Date: Mon, 16 Feb 2009 13:16:19 +0800 Subject: [ltt-dev] [PATCH] LTTng: Make mark-control work in debugfs In-Reply-To: <20090216043703.GA27302@Krystal> References: <20090213065458.GA20178@Krystal> <4998D2B6.7030001@cn.fujitsu.com> <20090216121549.E80D.A69D9226@jp.fujitsu.com> <4998E204.3010405@cn.fujitsu.com> <20090216043703.GA27302@Krystal> Message-ID: <4998F6A3.4050001@cn.fujitsu.com> Mathieu Desnoyers wrote: > * Gui Jianfeng (guijianfeng at cn.fujitsu.com) wrote: >> KOSAKI Motohiro wrote: >>>> Hi Mathieu, >>>> >>>> I guess it's not easy to implement the *mkdir* for marker control. >>>> But I have an alternative solution that we can add a control file >>>> *new_channel* at the same level of channel directories, and add a >>>> control file *new_marker* in each channel directory. >>>> Making use of the following, we can create a marker even if it >>>> doesn't exist by now. >>>> >>>> cd /mnt/ltt/markers >>>> echo "channel_name" > new_channel >>>> echo "marker_name" > channel_name/new_marker >>> No. >>> good user interface is important than easy implementation. >>> >>> this UI is really ugly. >> Hi Kosaki-san, >> >> Thank you for your kind comments. >> I say *not easy* becasue debugfs itself doesn't support *mkdir* completely. >> If we are going to implement mkdir in marker control, we have to modify debugfs >> itself. IMHO, it's not reasonable and i guess most of the debugfs subsystems don't >> like to see this change. >> On the other hand, it's very natual to use a control file to do something in debugfs. >> So, I choose this solution. I hope that what I say will clarify the situation.:) >> Mathieu, What do you say? >> > > Hi Gui, > > I would recommend adding mkdir support in our own directories. That > means we have to override debugfs use of "simple" libfs basic > operations. We want to use the same operations, but also define a mkdir > callback. See > > fs/debugfs/inode.c: > debugfs_get_inode : > it sets inode->i_op = &simple_dir_inode_operations; > > We will need to override this with our own. See > fs/libfs.c: simple_dir_inode_operations > Ah, I see now, thanks for the suggestion, > I fully agree with Kosaki : the quality of the user interface is what > matters and is much more important than implementation difficulty. Me too :) > > Thanks, > > Mathieu > >>> >>> >>> >>> >>> >> -- >> Regards >> Gui Jianfeng >> >> >> _______________________________________________ >> ltt-dev mailing list >> ltt-dev at lists.casi.polymtl.ca >> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev >> > -- Regards Gui Jianfeng