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 | |
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')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap_btree.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_dfrag.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_dinode.h | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_iomap.c | 10 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_rw.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 12 |
13 files changed, 32 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 36dadc4ff22c..e0519529c26c 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -113,7 +113,7 @@ xfs_find_bdev_for_inode( | |||
113 | { | 113 | { |
114 | struct xfs_mount *mp = ip->i_mount; | 114 | struct xfs_mount *mp = ip->i_mount; |
115 | 115 | ||
116 | if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) | 116 | if (XFS_IS_REALTIME_INODE(ip)) |
117 | return mp->m_rtdev_targp->bt_bdev; | 117 | return mp->m_rtdev_targp->bt_bdev; |
118 | else | 118 | else |
119 | return mp->m_ddev_targp->bt_bdev; | 119 | return mp->m_ddev_targp->bt_bdev; |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index daa351a0a03d..4c82a050a3a8 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -741,7 +741,7 @@ xfs_ioctl( | |||
741 | case XFS_IOC_DIOINFO: { | 741 | case XFS_IOC_DIOINFO: { |
742 | struct dioattr da; | 742 | struct dioattr da; |
743 | xfs_buftarg_t *target = | 743 | xfs_buftarg_t *target = |
744 | (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? | 744 | XFS_IS_REALTIME_INODE(ip) ? |
745 | mp->m_rtdev_targp : mp->m_ddev_targp; | 745 | mp->m_rtdev_targp : mp->m_ddev_targp; |
746 | 746 | ||
747 | da.d_mem = da.d_miniosz = 1 << target->bt_sshift; | 747 | da.d_mem = da.d_miniosz = 1 << target->bt_sshift; |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 9ddef91a436d..1ecd86a8c6e6 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -612,7 +612,7 @@ xfs_vn_getattr( | |||
612 | sysv_minor(ip->i_df.if_u2.if_rdev)); | 612 | sysv_minor(ip->i_df.if_u2.if_rdev)); |
613 | break; | 613 | break; |
614 | default: | 614 | default: |
615 | if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) { | 615 | if (XFS_IS_REALTIME_INODE(ip)) { |
616 | /* | 616 | /* |
617 | * If the file blocks are being allocated from a | 617 | * If the file blocks are being allocated from a |
618 | * realtime volume, then return the inode's realtime | 618 | * realtime volume, then return the inode's realtime |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 459d36480b16..19a1f077dbd6 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -202,7 +202,7 @@ xfs_read( | |||
202 | 202 | ||
203 | if (unlikely(ioflags & IO_ISDIRECT)) { | 203 | if (unlikely(ioflags & IO_ISDIRECT)) { |
204 | xfs_buftarg_t *target = | 204 | xfs_buftarg_t *target = |
205 | (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? | 205 | XFS_IS_REALTIME_INODE(ip) ? |
206 | mp->m_rtdev_targp : mp->m_ddev_targp; | 206 | mp->m_rtdev_targp : mp->m_ddev_targp; |
207 | if ((*offset & target->bt_smask) || | 207 | if ((*offset & target->bt_smask) || |
208 | (size & target->bt_smask)) { | 208 | (size & target->bt_smask)) { |
@@ -657,7 +657,7 @@ start: | |||
657 | 657 | ||
658 | if (ioflags & IO_ISDIRECT) { | 658 | if (ioflags & IO_ISDIRECT) { |
659 | xfs_buftarg_t *target = | 659 | xfs_buftarg_t *target = |
660 | (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? | 660 | XFS_IS_REALTIME_INODE(xip) ? |
661 | mp->m_rtdev_targp : mp->m_ddev_targp; | 661 | mp->m_rtdev_targp : mp->m_ddev_targp; |
662 | 662 | ||
663 | if ((pos & target->bt_smask) || (count & target->bt_smask)) { | 663 | if ((pos & target->bt_smask) || (count & target->bt_smask)) { |
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index b02452b11456..aca51e7e5c5a 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -2969,7 +2969,7 @@ STATIC int | |||
2969 | xfs_bmap_alloc( | 2969 | xfs_bmap_alloc( |
2970 | xfs_bmalloca_t *ap) /* bmap alloc argument struct */ | 2970 | xfs_bmalloca_t *ap) /* bmap alloc argument struct */ |
2971 | { | 2971 | { |
2972 | if ((ap->ip->i_d.di_flags & XFS_DIFLAG_REALTIME) && ap->userdata) | 2972 | if (XFS_IS_REALTIME_INODE(ap->ip) && ap->userdata) |
2973 | return xfs_bmap_rtalloc(ap); | 2973 | return xfs_bmap_rtalloc(ap); |
2974 | return xfs_bmap_btalloc(ap); | 2974 | return xfs_bmap_btalloc(ap); |
2975 | } | 2975 | } |
@@ -3096,8 +3096,7 @@ xfs_bmap_del_extent( | |||
3096 | /* | 3096 | /* |
3097 | * Realtime allocation. Free it and record di_nblocks update. | 3097 | * Realtime allocation. Free it and record di_nblocks update. |
3098 | */ | 3098 | */ |
3099 | if (whichfork == XFS_DATA_FORK && | 3099 | if (whichfork == XFS_DATA_FORK && XFS_IS_REALTIME_INODE(ip)) { |
3100 | (ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { | ||
3101 | xfs_fsblock_t bno; | 3100 | xfs_fsblock_t bno; |
3102 | xfs_filblks_t len; | 3101 | xfs_filblks_t len; |
3103 | 3102 | ||
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 32b49ec00fb5..c4181d85605c 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c | |||
@@ -2062,8 +2062,7 @@ xfs_bmbt_insert( | |||
2062 | pcur->bc_private.b.allocated; | 2062 | pcur->bc_private.b.allocated; |
2063 | pcur->bc_private.b.allocated = 0; | 2063 | pcur->bc_private.b.allocated = 0; |
2064 | ASSERT((cur->bc_private.b.firstblock != NULLFSBLOCK) || | 2064 | ASSERT((cur->bc_private.b.firstblock != NULLFSBLOCK) || |
2065 | (cur->bc_private.b.ip->i_d.di_flags & | 2065 | XFS_IS_REALTIME_INODE(cur->bc_private.b.ip)); |
2066 | XFS_DIFLAG_REALTIME)); | ||
2067 | cur->bc_private.b.firstblock = | 2066 | cur->bc_private.b.firstblock = |
2068 | pcur->bc_private.b.firstblock; | 2067 | pcur->bc_private.b.firstblock; |
2069 | ASSERT(cur->bc_private.b.flist == | 2068 | ASSERT(cur->bc_private.b.flist == |
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 4ad29cbb4233..03a42d21610a 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c | |||
@@ -185,8 +185,7 @@ xfs_swap_extents( | |||
185 | } | 185 | } |
186 | 186 | ||
187 | /* Verify both files are either real-time or non-realtime */ | 187 | /* Verify both files are either real-time or non-realtime */ |
188 | if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != | 188 | if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { |
189 | (tip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { | ||
190 | error = XFS_ERROR(EINVAL); | 189 | error = XFS_ERROR(EINVAL); |
191 | goto error0; | 190 | goto error0; |
192 | } | 191 | } |
diff --git a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h index dedd713574e1..85030cbcdd87 100644 --- a/fs/xfs/xfs_dinode.h +++ b/fs/xfs/xfs_dinode.h | |||
@@ -273,6 +273,12 @@ typedef enum xfs_dinode_fmt | |||
273 | #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) | 273 | #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) |
274 | #define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) | 274 | #define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) |
275 | 275 | ||
276 | #ifdef CONFIG_XFS_RT | ||
277 | #define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) | ||
278 | #else | ||
279 | #define XFS_IS_REALTIME_INODE(ip) (0) | ||
280 | #endif | ||
281 | |||
276 | #define XFS_DIFLAG_ANY \ | 282 | #define XFS_DIFLAG_ANY \ |
277 | (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \ | 283 | (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \ |
278 | XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ | 284 | XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 805cab7b2770..815ae978e3bd 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1296,7 +1296,10 @@ xfs_isize_check( | |||
1296 | if ((ip->i_d.di_mode & S_IFMT) != S_IFREG) | 1296 | if ((ip->i_d.di_mode & S_IFMT) != S_IFREG) |
1297 | return; | 1297 | return; |
1298 | 1298 | ||
1299 | if (ip->i_d.di_flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_EXTSIZE)) | 1299 | if (XFS_IS_REALTIME_INODE(ip)) |
1300 | return; | ||
1301 | |||
1302 | if (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | ||
1300 | return; | 1303 | return; |
1301 | 1304 | ||
1302 | nimaps = 2; | 1305 | nimaps = 2; |
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 637a24473f9b..fde37f87d52f 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -141,7 +141,7 @@ xfs_imap_to_bmap( | |||
141 | iomapp->iomap_bsize = XFS_FSB_TO_B(mp, imap->br_blockcount); | 141 | iomapp->iomap_bsize = XFS_FSB_TO_B(mp, imap->br_blockcount); |
142 | iomapp->iomap_flags = flags; | 142 | iomapp->iomap_flags = flags; |
143 | 143 | ||
144 | if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) { | 144 | if (XFS_IS_REALTIME_INODE(ip)) { |
145 | iomapp->iomap_flags |= IOMAP_REALTIME; | 145 | iomapp->iomap_flags |= IOMAP_REALTIME; |
146 | iomapp->iomap_target = mp->m_rtdev_targp; | 146 | iomapp->iomap_target = mp->m_rtdev_targp; |
147 | } else { | 147 | } else { |
@@ -298,7 +298,7 @@ xfs_iomap_eof_align_last_fsb( | |||
298 | xfs_extlen_t align; | 298 | xfs_extlen_t align; |
299 | int eof, error; | 299 | int eof, error; |
300 | 300 | ||
301 | if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) | 301 | if (XFS_IS_REALTIME_INODE(ip)) |
302 | ; | 302 | ; |
303 | /* | 303 | /* |
304 | * If mounted with the "-o swalloc" option, roundup the allocation | 304 | * If mounted with the "-o swalloc" option, roundup the allocation |
@@ -524,7 +524,7 @@ xfs_iomap_write_direct( | |||
524 | } | 524 | } |
525 | 525 | ||
526 | if (unlikely(!imap.br_startblock && | 526 | if (unlikely(!imap.br_startblock && |
527 | !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) { | 527 | !(XFS_IS_REALTIME_INODE(ip)))) { |
528 | error = xfs_cmn_err_fsblock_zero(ip, &imap); | 528 | error = xfs_cmn_err_fsblock_zero(ip, &imap); |
529 | goto error_out; | 529 | goto error_out; |
530 | } | 530 | } |
@@ -687,7 +687,7 @@ retry: | |||
687 | } | 687 | } |
688 | 688 | ||
689 | if (unlikely(!imap[0].br_startblock && | 689 | if (unlikely(!imap[0].br_startblock && |
690 | !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) | 690 | !(XFS_IS_REALTIME_INODE(ip)))) |
691 | return xfs_cmn_err_fsblock_zero(ip, &imap[0]); | 691 | return xfs_cmn_err_fsblock_zero(ip, &imap[0]); |
692 | 692 | ||
693 | *ret_imap = imap[0]; | 693 | *ret_imap = imap[0]; |
@@ -932,7 +932,7 @@ xfs_iomap_write_unwritten( | |||
932 | return XFS_ERROR(error); | 932 | return XFS_ERROR(error); |
933 | 933 | ||
934 | if (unlikely(!imap.br_startblock && | 934 | if (unlikely(!imap.br_startblock && |
935 | !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) | 935 | !(XFS_IS_REALTIME_INODE(ip)))) |
936 | return xfs_cmn_err_fsblock_zero(ip, &imap); | 936 | return xfs_cmn_err_fsblock_zero(ip, &imap); |
937 | 937 | ||
938 | if ((numblks_fsb = imap.br_blockcount) == 0) { | 938 | if ((numblks_fsb = imap.br_blockcount) == 0) { |
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h index 799c1f871263..8d8dcd215716 100644 --- a/fs/xfs/xfs_rtalloc.h +++ b/fs/xfs/xfs_rtalloc.h | |||
@@ -21,8 +21,6 @@ | |||
21 | struct xfs_mount; | 21 | struct xfs_mount; |
22 | struct xfs_trans; | 22 | struct xfs_trans; |
23 | 23 | ||
24 | #define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) | ||
25 | |||
26 | /* Min and max rt extent sizes, specified in bytes */ | 24 | /* Min and max rt extent sizes, specified in bytes */ |
27 | #define XFS_MAX_RTEXTSIZE (1024 * 1024 * 1024) /* 1GB */ | 25 | #define XFS_MAX_RTEXTSIZE (1024 * 1024 * 1024) /* 1GB */ |
28 | #define XFS_DFL_RTEXTSIZE (64 * 1024) /* 64KB */ | 26 | #define XFS_DFL_RTEXTSIZE (64 * 1024) /* 64KB */ |
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; |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index d964e21521ab..5322d9fb5321 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -136,7 +136,7 @@ xfs_getattr( | |||
136 | default: | 136 | default: |
137 | vap->va_rdev = 0; | 137 | vap->va_rdev = 0; |
138 | 138 | ||
139 | if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { | 139 | if (!(XFS_IS_REALTIME_INODE(ip))) { |
140 | vap->va_blocksize = xfs_preferred_iosize(mp); | 140 | vap->va_blocksize = xfs_preferred_iosize(mp); |
141 | } else { | 141 | } else { |
142 | 142 | ||
@@ -508,7 +508,7 @@ xfs_setattr( | |||
508 | */ | 508 | */ |
509 | if ((ip->i_d.di_nextents || ip->i_delayed_blks) && | 509 | if ((ip->i_d.di_nextents || ip->i_delayed_blks) && |
510 | (mask & XFS_AT_XFLAGS) && | 510 | (mask & XFS_AT_XFLAGS) && |
511 | (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != | 511 | (XFS_IS_REALTIME_INODE(ip)) != |
512 | (vap->va_xflags & XFS_XFLAG_REALTIME)) { | 512 | (vap->va_xflags & XFS_XFLAG_REALTIME)) { |
513 | code = XFS_ERROR(EINVAL); /* EFBIG? */ | 513 | code = XFS_ERROR(EINVAL); /* EFBIG? */ |
514 | goto error_return; | 514 | goto error_return; |
@@ -520,7 +520,7 @@ xfs_setattr( | |||
520 | if ((mask & XFS_AT_EXTSIZE) && vap->va_extsize != 0) { | 520 | if ((mask & XFS_AT_EXTSIZE) && vap->va_extsize != 0) { |
521 | xfs_extlen_t size; | 521 | xfs_extlen_t size; |
522 | 522 | ||
523 | if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) || | 523 | if (XFS_IS_REALTIME_INODE(ip) || |
524 | ((mask & XFS_AT_XFLAGS) && | 524 | ((mask & XFS_AT_XFLAGS) && |
525 | (vap->va_xflags & XFS_XFLAG_REALTIME))) { | 525 | (vap->va_xflags & XFS_XFLAG_REALTIME))) { |
526 | size = mp->m_sb.sb_rextsize << | 526 | size = mp->m_sb.sb_rextsize << |
@@ -1144,7 +1144,7 @@ xfs_fsync( | |||
1144 | * If this inode is on the RT dev we need to flush that | 1144 | * If this inode is on the RT dev we need to flush that |
1145 | * cache as well. | 1145 | * cache as well. |
1146 | */ | 1146 | */ |
1147 | if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) | 1147 | if (XFS_IS_REALTIME_INODE(ip)) |
1148 | xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp); | 1148 | xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp); |
1149 | } | 1149 | } |
1150 | 1150 | ||
@@ -4044,7 +4044,7 @@ xfs_zero_remaining_bytes( | |||
4044 | int error = 0; | 4044 | int error = 0; |
4045 | 4045 | ||
4046 | bp = xfs_buf_get_noaddr(mp->m_sb.sb_blocksize, | 4046 | bp = xfs_buf_get_noaddr(mp->m_sb.sb_blocksize, |
4047 | ip->i_d.di_flags & XFS_DIFLAG_REALTIME ? | 4047 | XFS_IS_REALTIME_INODE(ip) ? |
4048 | mp->m_rtdev_targp : mp->m_ddev_targp); | 4048 | mp->m_rtdev_targp : mp->m_ddev_targp); |
4049 | 4049 | ||
4050 | for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { | 4050 | for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { |
@@ -4141,7 +4141,7 @@ xfs_free_file_space( | |||
4141 | error = 0; | 4141 | error = 0; |
4142 | if (len <= 0) /* if nothing being freed */ | 4142 | if (len <= 0) /* if nothing being freed */ |
4143 | return error; | 4143 | return error; |
4144 | rt = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME); | 4144 | rt = XFS_IS_REALTIME_INODE(ip); |
4145 | startoffset_fsb = XFS_B_TO_FSB(mp, offset); | 4145 | startoffset_fsb = XFS_B_TO_FSB(mp, offset); |
4146 | end_dmi_offset = offset + len; | 4146 | end_dmi_offset = offset + len; |
4147 | endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); | 4147 | endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); |