xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 10/25] xfs: verify btree blocks as they are read from disk
From: Phil White <pwhite@xxxxxxx>
Date: Mon, 29 Oct 2012 18:14:19 -0700
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1351146854-19343-11-git-send-email-david@xxxxxxxxxxxxx>
References: <1351146854-19343-1-git-send-email-david@xxxxxxxxxxxxx> <1351146854-19343-11-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 25, 2012 at 05:33:59PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>