lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1323831406.23971.14.camel@gandalf.stny.rr.com>
Date:	Tue, 13 Dec 2011 21:56:46 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Curt Wohlgemuth <curtw@...gle.com>, Jan Kara <jack@...e.cz>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] writeback: Unduplicate writeback reason

On Wed, 2011-12-14 at 09:49 +0800, Wu Fengguang wrote:
> Hi Steven,
> 
> On Wed, Dec 14, 2011 at 09:14:00AM +0800, Steven Rostedt wrote:
> > Names of the writeback reasons are used in both the main kernel as well
> > as for parsing the tracepoint format file. Instead of duplicating the
> > names in two locations making it likely that they may become out of
> > sync, use some macro magic to make sure all the names stay in sync. Any
> > update only needs to happen in one spot for it to take place in all
> > locations.
>  
> It looks a bit hacky,

One of my professors showed me this trick a long time ago when I was
going for my Masters. It was actually the trick I based the entire
TRACE_EVENT() macro magic on :)

>  but does the nice job of de-duplicating code.
> And it compiles. So I like it and would like to take it with the below
> rename :-)
> 
> > Note, this is an RFC patch, and it probably needs much better comments
> > (well, it currently has no comments), and the C() macro probably should
> > have a different name too.
> 
> C => WB_ENUM_REASONS_ITEM? It may look unpleasantly long, however is
> unique enough to make the many #define/#undef safe. 

Sure. Acked-by: Steven Rostedt <rostedt@...dmis.org>

Note, there's one buggy issue still. That the enums names still trip up
trace-cmd. But that's fine, because I have a plan to fix that too. But
that will be on the ftrace said.

Thanks!

-- Steve


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ