xfs
[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sun, 19 Aug 2007 14:10:51 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070819190847.GB2929@xxxxxxxxxxxxx>
References: <46C7627A.60503@xxxxxxxxxxx> <20070819190847.GB2929@xxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
Christoph Hellwig wrote:
> 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.
> 

Fedora does :)

-Eric


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