1 Mar 2010 04:16
Re: Proposed patch for xfsprogs
Dave Chinner <david <at> fromorbit.com>
2010-03-01 03:16:42 GMT
2010-03-01 03:16:42 GMT
On Sat, Feb 27, 2010 at 05:54:10PM -0500, C. Linus Hicks wrote:
> During my recent experience with having to reconstruct parts of an XFS
> filesystem that got corrupted as a result of several bad blocks, I found
> that some of the information displayed using "blockget -v" was pretty
> useless, and I am proposing the following code change to introduce a
> slight summarization.
>
> Repeating lines of "setting block <foo> to <bar>" and "setting inode to
> <foo> for {,rt}block <bar>" will be summarized down to two lines.
Agreed, that would certainly help reduce the verbosity of the output.
However, I don't think the patch is correct.
> --- a/xfsprogs-3.1.1/db/check.c 2010-01-29 14:46:13.000000000 -0500
> +++ b/xfsprogs-3.1.1/db/check.c 2010-02-27 17:02:14.111418960 -0500
> <at> <at> -1509,6 +1509,7 <at> <at>
> {
> xfs_extlen_t i;
> int mayprint;
> + int isfirst = 1;
> char *p;
>
> if (!check_range(agno, agbno, len)) {
> <at> <at> -1520,10 +1521,15 <at> <at>
> mayprint = verbose | blist_size;
> for (i = 0, p = &dbmap[agno][agbno]; i < len; i++, p++) {
> *p = (char)type2;
> - if (mayprint && (verbose || CHECK_BLISTA(agno, agbno + i)))
> + if (isfirst && mayprint && (verbose || CHECK_BLISTA(agno, agbno + i))) {
> dbprintf(_("setting block %u/%u to %s\n"), agno, agbno + i,
(Continue reading)
RSS Feed