summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_data.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-12 22:54:18 +1100
committerBen Myers <bpm@sgi.com>2012-11-15 21:34:57 -0600
commitda6958c873ecd846d71fafbfe0f6168bb9c2c99e (patch)
tree638e8ec75ef0592dd896f74e2b2215af3021bf0a /fs/xfs/xfs_dir2_data.c
parentd9392a4bb75503fc2adbb5237c3df940c6467eb2 (diff)
downloadop-kernel-dev-da6958c873ecd846d71fafbfe0f6168bb9c2c99e.zip
op-kernel-dev-da6958c873ecd846d71fafbfe0f6168bb9c2c99e.tar.gz
xfs: Add verifiers to dir2 data readahead.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Phil White <pwhite@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_data.c')
-rw-r--r--fs/xfs/xfs_dir2_data.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c
index 0ef04f1..1a43c85 100644
--- a/fs/xfs/xfs_dir2_data.c
+++ b/fs/xfs/xfs_dir2_data.c
@@ -185,7 +185,7 @@ __xfs_dir2_data_check(
return 0;
}
-static void
+void
xfs_dir2_data_verify(
struct xfs_buf *bp)
{
@@ -217,6 +217,17 @@ xfs_dir2_data_read(
XFS_DATA_FORK, xfs_dir2_data_verify);
}
+int
+xfs_dir2_data_readahead(
+ struct xfs_trans *tp,
+ struct xfs_inode *dp,
+ xfs_dablk_t bno,
+ xfs_daddr_t mapped_bno)
+{
+ return xfs_da_reada_buf(tp, dp, bno, mapped_bno,
+ XFS_DATA_FORK, xfs_dir2_data_verify);
+}
+
/*
* Given a data block and an unused entry from that block,
* return the bestfree entry if any that corresponds to it.
OpenPOWER on IntegriCloud