xfs
[Top] [All Lists]

Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 19 Aug 2007 20:08:47 +0100
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <46C7627A.60503@xxxxxxxxxxx>
References: <46C7627A.60503@xxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.3i
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.


<Prev in Thread] Current Thread [Next in Thread>