diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2007-11-23 00:29:42 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 02:16:43 -0500 |
commit | 71ddabb94a623d1e16e7e66898bf439ff78ecc41 (patch) | |
tree | ded37e51148312db71e6a68b18c8bfca49b95112 /fs/xfs/xfs_rw.h | |
parent | a67d7c5f5d25d0b13a4dfb182697135b014fa478 (diff) |
[XFS] optimize XFS_IS_REALTIME_INODE w/o realtime config
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:
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:
xfs_alloc_file_space -8 xfs_bmap_adjacent -16 xfs_bmapi -8
xfs_bmap_rtalloc -16 xfs_bunmapi -28 xfs_free_file_space -64 xfs_imap +8
<-- ? hmm. xfs_iomap_write_direct -12 xfs_qm_dqusage_adjust -4
xfs_qm_vop_chown_reserve -4
SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30014a
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rw.h')
-rw-r--r-- | fs/xfs/xfs_rw.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index bcfe07aa7e6b..f87db5344ce6 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h | |||
@@ -32,7 +32,7 @@ struct xfs_mount; | |||
32 | static inline xfs_daddr_t | 32 | static inline xfs_daddr_t |
33 | xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) | 33 | xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) |
34 | { | 34 | { |
35 | return (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ | 35 | return (XFS_IS_REALTIME_INODE(ip) ? \ |
36 | (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ | 36 | (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ |
37 | XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); | 37 | XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); |
38 | } | 38 | } |
@@ -53,7 +53,7 @@ xfs_get_extsz_hint( | |||
53 | { | 53 | { |
54 | xfs_extlen_t extsz; | 54 | xfs_extlen_t extsz; |
55 | 55 | ||
56 | if (unlikely(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { | 56 | if (unlikely(XFS_IS_REALTIME_INODE(ip))) { |
57 | extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | 57 | extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) |
58 | ? ip->i_d.di_extsize | 58 | ? ip->i_d.di_extsize |
59 | : ip->i_mount->m_sb.sb_rextsize; | 59 | : ip->i_mount->m_sb.sb_rextsize; |