xfs: factor dir2 free block reading

Also factor out the updating of the free block when removing entries
from leaf blocks, and add a verifier callback for reads.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
Dave Chinner
2012-11-12 22:54:13 +11:00
committed by Ben Myers
parent 82025d7f79
commit 2025207ca6
3 changed files with 143 additions and 80 deletions

View File

@@ -1863,8 +1863,7 @@ xfs_dir2_node_to_leaf(
/*
* Read the freespace block.
*/
error = xfs_da_read_buf(tp, dp, mp->m_dirfreeblk, -1, &fbp,
XFS_DATA_FORK, NULL);
error = xfs_dir2_free_read(tp, dp, mp->m_dirfreeblk, &fbp);
if (error)
return error;
free = fbp->b_addr;