xfs
[Top] [All Lists]

Re: [PATCH 03/48] libxfs: add crc format changes to generic btrees

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 03/48] libxfs: add crc format changes to generic btrees
From: Ben Myers <bpm@xxxxxxx>
Date: Tue, 23 Jul 2013 13:26:48 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370564771-4929-4-git-send-email-david@xxxxxxxxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx> <1370564771-4929-4-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jun 07, 2013 at 10:25:26AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

This patch mostly corresponds to commit ee1a47ab0e, and in some areas it is
equivalent but slightly different.  There are some other things in here too:

* Addition of XFS_BUF_DADDR_NULL
* rename of b_blkno to b_bn in struct xfs_buf
* rename of b_fsprivate to b_fspriv in struct xfs_buf
* addition of uuid_copy and uuid_equal, and libuuid to build

It all looks fine to me, except as below:

>  static void
> @@ -733,13 +760,29 @@ xfs_bmbt_read_verify(
>       struct xfs_buf  *bp)
>  {
>       xfs_bmbt_verify(bp);
        ^^^^^^^^^^^^^^^^^^^^
In commit ee1a47ab0e we removed this call.

> +     if (!(xfs_btree_lblock_verify_crc(bp) &&
> +           xfs_bmbt_verify(bp))) {
> +             trace_xfs_btree_corrupt(bp, _RET_IP_);
> +             XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
> +                                  bp->b_target->bt_mount, bp->b_addr);
> +             xfs_buf_ioerror(bp, EFSCORRUPTED);
> +     }
> +
>  }
>  
>  static void
>  xfs_bmbt_write_verify(
>       struct xfs_buf  *bp)
>  {
> -     xfs_bmbt_verify(bp);
        ^^^^^^^^^^^^^^^^^^^^
As we did here

> +     if (!xfs_bmbt_verify(bp)) {
> +             xfs_warn(bp->b_target->bt_mount, "bmbt daddr 0x%llx failed", 
> bp->b_bn);
> +             trace_xfs_btree_corrupt(bp, _RET_IP_);
> +             XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
> +                                  bp->b_target->bt_mount, bp->b_addr);
> +             xfs_buf_ioerror(bp, EFSCORRUPTED);
> +             return;
> +     }
> +     xfs_btree_lblock_calc_crc(bp);

Is that addressed later in the series?

Reviewed-by: Ben Myers <bpm@xxxxxxx>

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