* [PATCH] xfs_repair: release corrupt directory node buffer
@ 2015-09-04 4:21 Darrick J. Wong
2015-09-04 4:27 ` Eric Sandeen
2015-09-04 12:59 ` Carlos Maiolino
0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2015-09-04 4:21 UTC (permalink / raw)
To: david; +Cc: sandeen, xfs
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@sandeen.net>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
repair/dir2.c | 1 +
1 file changed, 1 insertion(+)
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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xfs_repair: release corrupt directory node buffer
2015-09-04 4:21 [PATCH] xfs_repair: release corrupt directory node buffer Darrick J. Wong
@ 2015-09-04 4:27 ` Eric Sandeen
2015-09-04 12:59 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2015-09-04 4:27 UTC (permalink / raw)
To: Darrick J. Wong, david; +Cc: xfs
On 9/3/15 11:21 PM, 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@sandeen.net>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> repair/dir2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfs_repair: release corrupt directory node buffer
2015-09-04 4:21 [PATCH] xfs_repair: release corrupt directory node buffer Darrick J. Wong
2015-09-04 4:27 ` Eric Sandeen
@ 2015-09-04 12:59 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2015-09-04 12:59 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: sandeen, xfs
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@sandeen.net>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> repair/dir2.c | 1 +
> 1 file changed, 1 insertion(+)
>
Makes sense.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> 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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
--
Carlos
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-04 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 4:21 [PATCH] xfs_repair: release corrupt directory node buffer Darrick J. Wong
2015-09-04 4:27 ` Eric Sandeen
2015-09-04 12:59 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox