aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 01:59:01 -0400
committerBen Myers <bpm@sgi.com>2012-05-14 17:20:57 -0400
commitfd50092c08068b5bc5d170bc17894db584aaf7b2 (patch)
tree0d2abe20735bf44e88727ec074fa55a298dc086d /fs/xfs/xfs_bmap.c
parent4ecbfe637cbcc0f093d1f295ef483f4e31e3987b (diff)
xfs: move xfs_fsb_to_db to xfs_bmap.h
This is the only remaining useful function in xfs_rw.h, so move it to a header file responsible for block mapping functions that the callers already include. Soon we can get rid of xfs_rw.h. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r--fs/xfs/xfs_bmap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index e74cfaf52248..7431381751ec 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -6169,3 +6169,16 @@ next_block:
6169 6169
6170 return error; 6170 return error;
6171} 6171}
6172
6173/*
6174 * Convert the given file system block to a disk block. We have to treat it
6175 * differently based on whether the file is a real time file or not, because the
6176 * bmap code does.
6177 */
6178xfs_daddr_t
6179xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
6180{
6181 return (XFS_IS_REALTIME_INODE(ip) ? \
6182 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \
6183 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb)));
6184}