From: Dave Chinner <david@fromorbit.com>
To: Ben Myers <bpm@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_repair: fix process_bmbt_reclist_int
Date: Wed, 4 Dec 2013 10:08:04 +1100 [thread overview]
Message-ID: <20131203230804.GA10988@dastard> (raw)
In-Reply-To: <20131203215735.GQ1935@sgi.com>
On Tue, Dec 03, 2013 at 03:57:35PM -0600, Ben Myers wrote:
> There is a set checks for corruption in block map btrees in
> process_bmbt_reclist_int that we identify but currently do not fix. It
> appears that the author's intent in this function was to set error = 1,
> and then only clear it when all of the checks were completed
> successfully. Unfortunately error can be cleared when it is used for
> the return value of blkmap_set_ext. Some kinds of corruption are not
> being fixed, including duplicate extents, claiming free blocks, claiming
> metadata blocks, and multiply used blocks.
>
> Fix this by shadowing error for blkmap_set_ext.
Shadowing variables is not a very nice way of solving the problem.
Someone will come along in a couple of years anf go "huh?" and
remove the shadowed declaration because it makes no sense and has
no comments explaining it.
Better is to use a different variable name for this scope - say
"error2" - or to reset error to a value of 1 after the call with a
comment explaining it....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-12-03 23:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 21:57 [PATCH] xfs_repair: fix process_bmbt_reclist_int Ben Myers
2013-12-03 23:08 ` Dave Chinner [this message]
2013-12-03 23:14 ` Ben Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131203230804.GA10988@dastard \
--to=david@fromorbit.com \
--cc=bpm@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox