xfs
[Top] [All Lists]

Re: [PATCH] xfs_repair: release corrupt directory node buffer

To: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Subject: Re: [PATCH] xfs_repair: release corrupt directory node buffer
From: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Date: Fri, 4 Sep 2015 14:59:38 +0200
Cc: david@xxxxxxxxxxxxx, sandeen@xxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150904042104.GD10397@xxxxxxxxxxxxxxxx>
Mail-followup-to: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>, david@xxxxxxxxxxxxx, sandeen@xxxxxxxxxxx, xfs@xxxxxxxxxxx
References: <20150904042104.GD10397@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Sep 03, 2015 at 09:21:04PM -0700, Darrick J. Wong wrote:
> If repair encounters a dir node block that fails checksum or
> verification, free the buffer before the directory gets rebuilt.
> 
> Reported-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> ---
>  repair/dir2.c |    1 +
>  1 file changed, 1 insertion(+)
> 
Makes sense.

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

> diff --git a/repair/dir2.c b/repair/dir2.c
> index a5646f8..54c49eb 100644
> --- a/repair/dir2.c
> +++ b/repair/dir2.c
> @@ -200,6 +200,7 @@ _("bad dir magic number 0x%x in inode %" PRIu64 " bno = 
> %u\n"),
>               }
>               /* corrupt node; rebuild the dir. */
>               if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
> +                     libxfs_putbuf(bp);
>                       do_warn(
>  _("corrupt tree block %u for directory inode %" PRIu64 "\n"),
>                               bno, da_cursor->ino);
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

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