xfs
[Top] [All Lists]

Re: [PATCH 25/25] xfs: add write verifiers to log recovery

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 25/25] xfs: add write verifiers to log recovery
From: Phil White <pwhite@xxxxxxx>
Date: Tue, 30 Oct 2012 06:44:27 -0700
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1351146854-19343-26-git-send-email-david@xxxxxxxxxxxxx>
References: <1351146854-19343-1-git-send-email-david@xxxxxxxxxxxxx> <1351146854-19343-26-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 25, 2012 at 05:34:14PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Log recovery reads metadata, modifies it and rewrites it to disk.
> It is only practical to add write verifiers to metadata buffers
> because we do not know the type of the buffer prior to reading it
> from disk. Further, if it is an new bufer, the contents might not
> contain anything we can verify. Hence we only attempt to verify
> after the buffer changes have been replayed and we can peek at the
> buffer to find out what it contains to attached the correct
> verifier.  This ensures that we don't introduce gross corruptions as
> a result of replaying transactions in the log.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_alloc.c       |    2 +-
>  fs/xfs/xfs_alloc.h       |    1 +
>  fs/xfs/xfs_alloc_btree.c |   15 ++++---
>  fs/xfs/xfs_da_btree.h    |    1 +
>  fs/xfs/xfs_dir2_leaf.c   |    2 +-
>  fs/xfs/xfs_dir2_node.c   |    2 +-
>  fs/xfs/xfs_dir2_priv.h   |    3 ++
>  fs/xfs/xfs_dquot.c       |   17 +++++++-
>  fs/xfs/xfs_dquot.h       |    2 +
>  fs/xfs/xfs_log_recover.c |  104 
> +++++++++++++++++++++++++++++++++++++++++++++-
>  10 files changed, 138 insertions(+), 11 deletions(-)

Generally, a good read.  It kept me on the edge of my seat.

Reviewed-by: Phil White <pwhite@xxxxxxx>

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