All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 2/5] repair: fix some valgrind reported errors on i686
Date: Mon, 10 Oct 2011 09:14:49 -0400	[thread overview]
Message-ID: <20111010131449.GA15671@infradead.org> (raw)
In-Reply-To: <20111010002017.GQ3159@dastard>

On Mon, Oct 10, 2011 at 11:20:17AM +1100, Dave Chinner wrote:
> > Call me stupid, but I can't see how this could actually be a real
> > life issue.  The first thing we do in the loop is to to write
> > to fsbno in btree_find.  I'm fine adding this to shut up warnins,
> > but I can't see a real issue.
> 
> If btree_find() fails to find the key being looked up, it returns
> without having initialised fsbno.

Indeed.  The normal pattern for btree_find seems to be:

	obj = btree_find(tree, key, &key_ptr);
	if (!obj)
		return;

which makes this fine.

The code in pf_batch_read effectively boils down to that due to
the 

	while (bplist[num] && num < MAX_BUFS && fsbno < max_fsbno) {

loop which stops executing the first conditional that evaluated to
false.  So I can't see how this actually ever had an affect, but I'm
fine with fixing the warnings.

Btw, did I mention that the while loop over the bplist is completely
non-intuitive?

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

  reply	other threads:[~2011-10-10 13:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 23:11 [PATCH 0/5, v2] repair: sector size and blkmap fixes Dave Chinner
2011-10-09 23:11 ` [PATCH 1/5] repair: handle repair of image files on large sector size filesystems Dave Chinner
2011-10-09 23:52   ` Christoph Hellwig
2011-10-10  0:17     ` Dave Chinner
2011-10-10  0:19       ` Christoph Hellwig
2011-10-09 23:11 ` [PATCH 2/5] repair: fix some valgrind reported errors on i686 Dave Chinner
2011-10-09 23:45   ` Christoph Hellwig
2011-10-10  0:20     ` Dave Chinner
2011-10-10 13:14       ` Christoph Hellwig [this message]
2011-10-09 23:11 ` [PATCH 3/5] repair: handle memory allocation failure from blkmap_grow Dave Chinner
2011-10-09 23:51   ` Christoph Hellwig
2011-10-10  0:10     ` Dave Chinner
2011-10-09 23:11 ` [PATCH 4/5] repair: don't cache large blkmap allocations Dave Chinner
2011-10-09 23:48   ` Christoph Hellwig
2011-10-10  0:14     ` Dave Chinner
2011-10-10 13:22       ` Christoph Hellwig
2011-10-09 23:11 ` [PATCH 5/5] repair: prevent blkmap extent count overflows Dave Chinner

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=20111010131449.GA15671@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.