aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_bmap.c13
-rw-r--r--fs/xfs/xfs_bmap.h3
-rw-r--r--fs/xfs/xfs_rw.h14
3 files changed, 16 insertions, 14 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}
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 89ee672d378a..803b56d7ce16 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -211,6 +211,9 @@ int xfs_bmap_count_blocks(struct xfs_trans *tp, struct xfs_inode *ip,
211 int whichfork, int *count); 211 int whichfork, int *count);
212int xfs_bmap_punch_delalloc_range(struct xfs_inode *ip, 212int xfs_bmap_punch_delalloc_range(struct xfs_inode *ip,
213 xfs_fileoff_t start_fsb, xfs_fileoff_t length); 213 xfs_fileoff_t start_fsb, xfs_fileoff_t length);
214
215xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb);
216
214#endif /* __KERNEL__ */ 217#endif /* __KERNEL__ */
215 218
216#endif /* __XFS_BMAP_H__ */ 219#endif /* __XFS_BMAP_H__ */
diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h
index 967b3a4b76ab..13f631732da1 100644
--- a/fs/xfs/xfs_rw.h
+++ b/fs/xfs/xfs_rw.h
@@ -23,20 +23,6 @@ struct xfs_inode;
23struct xfs_mount; 23struct xfs_mount;
24 24
25/* 25/*
26 * Convert the given file system block to a disk block.
27 * We have to treat it differently based on whether the
28 * file is a real time file or not, because the bmap code
29 * does.
30 */
31static inline xfs_daddr_t
32xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
33{
34 return (XFS_IS_REALTIME_INODE(ip) ? \
35 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \
36 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb)));
37}
38
39/*
40 * Prototypes for functions in xfs_rw.c. 26 * Prototypes for functions in xfs_rw.c.
41 */ 27 */
42extern xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip); 28extern xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip);