Commit 5eec8fa3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: remove xfs_btree_reada_bufl

xfs_btree_reada_bufl just wraps xfs_btree_readahead and a fsblock
to daddr conversion.  Just open code it's two callsites in the only
caller.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 79e72304
...@@ -889,25 +889,6 @@ xfs_btree_read_bufl( ...@@ -889,25 +889,6 @@ xfs_btree_read_bufl(
return 0; return 0;
} }
/*
* Read-ahead the block, don't wait for it, don't return a buffer.
* Long-form addressing.
*/
/* ARGSUSED */
void
xfs_btree_reada_bufl(
struct xfs_mount *mp, /* file system mount point */
xfs_fsblock_t fsbno, /* file system block number */
xfs_extlen_t count, /* count of filesystem blocks */
const struct xfs_buf_ops *ops)
{
xfs_daddr_t d;
ASSERT(fsbno != NULLFSBLOCK);
d = XFS_FSB_TO_DADDR(mp, fsbno);
xfs_buf_readahead(mp->m_ddev_targp, d, mp->m_bsize * count, ops);
}
/* /*
* Read-ahead the block, don't wait for it, don't return a buffer. * Read-ahead the block, don't wait for it, don't return a buffer.
* Short-form addressing. * Short-form addressing.
...@@ -935,19 +916,20 @@ xfs_btree_readahead_fsblock( ...@@ -935,19 +916,20 @@ xfs_btree_readahead_fsblock(
int lr, int lr,
struct xfs_btree_block *block) struct xfs_btree_block *block)
{ {
int rval = 0; struct xfs_mount *mp = cur->bc_mp;
xfs_fsblock_t left = be64_to_cpu(block->bb_u.l.bb_leftsib); xfs_fsblock_t left = be64_to_cpu(block->bb_u.l.bb_leftsib);
xfs_fsblock_t right = be64_to_cpu(block->bb_u.l.bb_rightsib); xfs_fsblock_t right = be64_to_cpu(block->bb_u.l.bb_rightsib);
int rval = 0;
if ((lr & XFS_BTCUR_LEFTRA) && left != NULLFSBLOCK) { if ((lr & XFS_BTCUR_LEFTRA) && left != NULLFSBLOCK) {
xfs_btree_reada_bufl(cur->bc_mp, left, 1, xfs_buf_readahead(mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, left),
cur->bc_ops->buf_ops); mp->m_bsize, cur->bc_ops->buf_ops);
rval++; rval++;
} }
if ((lr & XFS_BTCUR_RIGHTRA) && right != NULLFSBLOCK) { if ((lr & XFS_BTCUR_RIGHTRA) && right != NULLFSBLOCK) {
xfs_btree_reada_bufl(cur->bc_mp, right, 1, xfs_buf_readahead(mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, right),
cur->bc_ops->buf_ops); mp->m_bsize, cur->bc_ops->buf_ops);
rval++; rval++;
} }
......
...@@ -391,17 +391,6 @@ xfs_btree_read_bufl( ...@@ -391,17 +391,6 @@ xfs_btree_read_bufl(
int refval, /* ref count value for buffer */ int refval, /* ref count value for buffer */
const struct xfs_buf_ops *ops); const struct xfs_buf_ops *ops);
/*
* Read-ahead the block, don't wait for it, don't return a buffer.
* Long-form addressing.
*/
void /* error */
xfs_btree_reada_bufl(
struct xfs_mount *mp, /* file system mount point */
xfs_fsblock_t fsbno, /* file system block number */
xfs_extlen_t count, /* count of filesystem blocks */
const struct xfs_buf_ops *ops);
/* /*
* Read-ahead the block, don't wait for it, don't return a buffer. * Read-ahead the block, don't wait for it, don't return a buffer.
* Short-form addressing. * Short-form addressing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment