aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 01:58:49 -0400
committerBen Myers <bpm@sgi.com>2012-05-14 17:20:45 -0400
commite70b73f84f474cc594a39bd8ff083974e6d69aea (patch)
tree0d365698ca2b6542aab8ca92c8e1f23b9c43da55 /fs/xfs/xfs_rtalloc.c
parentbf813cdddfb3a5bc88e1612e8f62a12367871213 (diff)
xfs: clean up buffer get/read call API
The xfs_buf_get/read API is not consistent in the units it uses, and does not use appropriate or consistent units/types for the variables. Convert the API to use disk addresses and block counts for all buffer get and read calls. Use consistent naming for all the functions and their declarations, and convert the internal functions to use disk addresses and block counts to avoid need to convert them from one type to another and back again. Fix all the callers to use disk addresses and block counts. In many cases, this removes an additional conversion from the function call as the callers already have a block count. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index ca4f31534a0a..7434d3fd483a 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1872,9 +1872,9 @@ xfs_growfs_rt(
1872 /* 1872 /*
1873 * Read in the last block of the device, make sure it exists. 1873 * Read in the last block of the device, make sure it exists.
1874 */ 1874 */
1875 bp = xfs_buf_read_uncached(mp, mp->m_rtdev_targp, 1875 bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
1876 XFS_FSB_TO_BB(mp, nrblocks - 1), 1876 XFS_FSB_TO_BB(mp, nrblocks - 1),
1877 XFS_FSB_TO_B(mp, 1), 0); 1877 XFS_FSB_TO_BB(mp, 1), 0);
1878 if (!bp) 1878 if (!bp)
1879 return EIO; 1879 return EIO;
1880 xfs_buf_relse(bp); 1880 xfs_buf_relse(bp);
@@ -2219,9 +2219,9 @@ xfs_rtmount_init(
2219 (unsigned long long) mp->m_sb.sb_rblocks); 2219 (unsigned long long) mp->m_sb.sb_rblocks);
2220 return XFS_ERROR(EFBIG); 2220 return XFS_ERROR(EFBIG);
2221 } 2221 }
2222 bp = xfs_buf_read_uncached(mp, mp->m_rtdev_targp, 2222 bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
2223 d - XFS_FSB_TO_BB(mp, 1), 2223 d - XFS_FSB_TO_BB(mp, 1),
2224 XFS_FSB_TO_B(mp, 1), 0); 2224 XFS_FSB_TO_BB(mp, 1), 0);
2225 if (!bp) { 2225 if (!bp) {
2226 xfs_warn(mp, "realtime device size check failed"); 2226 xfs_warn(mp, "realtime device size check failed");
2227 return EIO; 2227 return EIO;