[PATCH 10/25] xfs: verify btree blocks as they are read from disk

Phil White pwhite at sgi.com
Mon Oct 29 20:14:19 CDT 2012


On Thu, Oct 25, 2012 at 05:33:59PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> Add an btree block verify callback function and pass it into the
> buffer read functions. Because each different btree block type
> requires different verification, add a function to the ops structure
> that is called from the generic code.
> 
> Also, propagate the verification callback functions through the
> readahead functions, and into the external bmap and bulkstat inode
> readahead code that uses the generic btree buffer read functions.
> 
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> ---
>  fs/xfs/xfs_alloc_btree.c  |   49 +++++++++++++++++++++++++++++++++
>  fs/xfs/xfs_bmap.c         |   60 ++++++++++++++++++++++++-----------------
>  fs/xfs/xfs_bmap_btree.c   |   47 ++++++++++++++++++++++++++++++++
>  fs/xfs/xfs_bmap_btree.h   |    1 +
>  fs/xfs/xfs_btree.c        |   66 +++++++++++++++++++++++----------------------
>  fs/xfs/xfs_btree.h        |   10 ++++---
>  fs/xfs/xfs_ialloc_btree.c |   40 +++++++++++++++++++++++++++
>  fs/xfs/xfs_inode.c        |    2 +-
>  fs/xfs/xfs_inode.h        |    1 +
>  fs/xfs/xfs_itable.c       |    3 ++-
>  10 files changed, 218 insertions(+), 61 deletions(-)

Looks good.  I remember there being conversations about whether or not
XFS needed to go on a stack diet for some platforms.  But in general,
I think there's merit to providing these functions as callbacks.

Reviewed-by: Phil White <pwhite at sgi.com>



More information about the xfs mailing list