diff options
author | David Chinner <dgc@sgi.com> | 2007-06-18 02:50:37 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-07-14 01:35:36 -0400 |
commit | 957d0ebed04239b734552c7da3fae9094b6f090c (patch) | |
tree | 6f5034b22028a03e31771d1a3fa5ad8d59557c09 /fs/xfs/xfs_vnodeops.c | |
parent | 84e1e99f112dead8f9ba036c02d24a9f5ce7f544 (diff) |
[XFS] Cleanup inode extent size hint extraction
SGI-PV: 966004
SGI-Modid: xfs-linux-melb:xfs-kern:28866a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 6420ca8df5ec..8c830a48165a 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -183,9 +183,8 @@ xfs_getattr( | |||
183 | * realtime extent size or the realtime volume's | 183 | * realtime extent size or the realtime volume's |
184 | * extent size. | 184 | * extent size. |
185 | */ | 185 | */ |
186 | vap->va_blocksize = ip->i_d.di_extsize ? | 186 | vap->va_blocksize = |
187 | (ip->i_d.di_extsize << mp->m_sb.sb_blocklog) : | 187 | xfs_get_extsz_hint(ip) << mp->m_sb.sb_blocklog; |
188 | (mp->m_sb.sb_rextsize << mp->m_sb.sb_blocklog); | ||
189 | } | 188 | } |
190 | break; | 189 | break; |
191 | } | 190 | } |
@@ -4055,22 +4054,16 @@ xfs_alloc_file_space( | |||
4055 | if (XFS_FORCED_SHUTDOWN(mp)) | 4054 | if (XFS_FORCED_SHUTDOWN(mp)) |
4056 | return XFS_ERROR(EIO); | 4055 | return XFS_ERROR(EIO); |
4057 | 4056 | ||
4058 | rt = XFS_IS_REALTIME_INODE(ip); | ||
4059 | if (unlikely(rt)) { | ||
4060 | if (!(extsz = ip->i_d.di_extsize)) | ||
4061 | extsz = mp->m_sb.sb_rextsize; | ||
4062 | } else { | ||
4063 | extsz = ip->i_d.di_extsize; | ||
4064 | } | ||
4065 | |||
4066 | if ((error = XFS_QM_DQATTACH(mp, ip, 0))) | 4057 | if ((error = XFS_QM_DQATTACH(mp, ip, 0))) |
4067 | return error; | 4058 | return error; |
4068 | 4059 | ||
4069 | if (len <= 0) | 4060 | if (len <= 0) |
4070 | return XFS_ERROR(EINVAL); | 4061 | return XFS_ERROR(EINVAL); |
4071 | 4062 | ||
4063 | rt = XFS_IS_REALTIME_INODE(ip); | ||
4064 | extsz = xfs_get_extsz_hint(ip); | ||
4065 | |||
4072 | count = len; | 4066 | count = len; |
4073 | error = 0; | ||
4074 | imapp = &imaps[0]; | 4067 | imapp = &imaps[0]; |
4075 | nimaps = 1; | 4068 | nimaps = 1; |
4076 | bmapi_flag = XFS_BMAPI_WRITE | (alloc_type ? XFS_BMAPI_PREALLOC : 0); | 4069 | bmapi_flag = XFS_BMAPI_WRITE | (alloc_type ? XFS_BMAPI_PREALLOC : 0); |