From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arjan van de Ven Subject: Re: [PATCH] vfs: Add a trace point in the mark_inode_dirty function Date: Sun, 28 Nov 2010 20:54:14 -0800 Message-ID: <20101128205414.78384a8b@infradead.org> References: <20101128175256.GA30783@infradead.org> <20101128104305.17d8665b@infradead.org> <20101129103845.82A5.A69D9226@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Al Viro To: KOSAKI Motohiro Return-path: Received: from casper.infradead.org ([85.118.1.10]:33280 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754847Ab0K2ExP (ORCPT ); Sun, 28 Nov 2010 23:53:15 -0500 In-Reply-To: <20101129103845.82A5.A69D9226@jp.fujitsu.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 29 Nov 2010 10:41:51 +0900 (JST) KOSAKI Motohiro wrote: > > Signed-of-by: Arjan van de Ven > > --- > > fs/fs-writeback.c | 3 +++ > > include/linux/fs.h | 12 ++++++++++++ > > include/trace/events/writeback.h | 28 > > ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 > > deletions(-) > > > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > > index 3d06ccc..62e33cc 100644 > > --- a/fs/fs-writeback.c > > +++ b/fs/fs-writeback.c > > @@ -952,6 +952,9 @@ void __mark_inode_dirty(struct inode *inode, > > int flags) if ((inode->i_state & flags) == flags) > > return; > > > > + if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | > > I_DIRTY_PAGES)) > > + trace_writeback_inode_dirty(inode, flags); > > + > > Why can't we move this branch into TP_fast_assign()? not really because then the tracepoint is already in process of being emitted... no way to retract it anymore.