On Mon, Apr 23, 2012 at 03:59:01PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> This is the only remaining useful function in xfs_rw.h, so move it
Well, xfs_get_extsz_hint also still is useful, and you only move it in
the next patch.
> + * Convert the given file system block to a disk block. We have to treat it
> + * differently based on whether the file is a real time file or not, because
> + * bmap code does.
> + */
Might be worth alaborating why exactly. When I last looked over it I
couldn't make much sense of it.
> +xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
> + return (XFS_IS_REALTIME_INODE(ip) ? \
> + (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \
> + XFS_FSB_TO_DADDR((ip)->i_mount, (fsb)));
Might be worth to "demacrofy" it while you're at it, e.g. rewrite it as:
xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
return XFS_FSB_TO_BB(ip->i_mount, fsb);
return XFS_FSB_TO_DADDR(ip->i_mount, fsb);