From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:29:09 -0700 (PDT) Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJT4bm014235 for ; Sun, 19 Aug 2007 12:29:06 -0700 Date: Sun, 19 Aug 2007 20:08:47 +0100 From: Christoph Hellwig Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config Message-ID: <20070819190847.GB2929@infradead.org> References: <46C7627A.60503@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C7627A.60503@sandeen.net> Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com List-Id: xfs To: Eric Sandeen Cc: xfs-oss On Sat, Aug 18, 2007 at 04:19:54PM -0500, Eric Sandeen wrote: > Use XFS_IS_REALTIME_INODE in more places, and #define it to > 0 if CONFIG_XFS_RT is off. This should be safe because mount > checks in xfs_rtmount_init: > > # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) > > so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should > be encountered after that. > > Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, > presumeably gcc can optimize around the various "if (0)" type > checks: Looks good to me. Not sure if anyone disables the rt volume, but as long as it's a config option we should try to avoid as much as possible away if it's not enabled.