public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_repair: multithread phase 2
Date: Mon, 10 Jan 2011 13:55:22 -0500	[thread overview]
Message-ID: <20110110185522.GC31325@infradead.org> (raw)
In-Reply-To: <1294620248-17098-1-git-send-email-david@fromorbit.com>


Looks good except for some trivial nitpicks below,


Reviewed-by: Christoph Hellwig <hch@lst.de>

Btw, your previous patch used just

"repair:" as the Subject prefix, while this one uses xfs_repair.  I
don't really care about, but we should standardize on one.  The more
recent usage seems to include the xfs_ prefix.

> +				     scanfunc_bno : scanfunc_cnt, 0,
> +				     (void *)agcnts);

no need for the void cast.

> +#define SCAN_THREADS 32

this is unused now.

> +	agcnts = malloc(mp->m_sb.sb_agcount * sizeof(*agcnts));
> +	if (!agcnts) {
> +		do_abort(_("no memory for ag header counts\n"));
> +		return;
> +	}
> +	memset(agcnts, 0, mp->m_sb.sb_agcount * sizeof(*agcnts));

this could use a calloc.

>  					break;
> +				case PHASE2_THREADS:
> +					phase2_threads = (int)strtol(val, NULL, 0);
> +					break;

This option also needs to be documented in the man page.  Also shouldn't
we try to handle errors from strtol?  Also maybe strtoul would be a
better choice as we certainly don't want a negative number of threads.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2011-01-10 18:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10  0:44 [PATCH] xfs_repair: multithread phase 2 Dave Chinner
2011-01-10  7:57 ` Michael Monnerie
2011-01-10  8:41   ` Dave Chinner
2011-01-10 13:25     ` Michael Monnerie
2011-01-10 19:18       ` Christoph Hellwig
2011-01-10 19:17     ` Christoph Hellwig
2011-01-10 21:53       ` Matthias Schniedermeyer
2011-01-10 18:55 ` Christoph Hellwig [this message]
2011-02-01 23:39 ` Alex Elder
  -- strict thread matches above, loose matches on Subject: below --
2011-01-04  6:13 Dave Chinner
2011-01-04 10:02 ` Christoph Hellwig
2011-01-04 12:00   ` Dave Chinner
2011-01-05 23:42 ` Alex Elder

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=20110110185522.GC31325@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.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