X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p9ADEqOQ178922 for ; Mon, 10 Oct 2011 08:14:52 -0500 X-ASG-Debug-ID: 1318252491-278b03360000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id D4DA41F1EF28 for ; Mon, 10 Oct 2011 06:14:51 -0700 (PDT) Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by cuda.sgi.com with ESMTP id BtvlIL2Zl5hcNRyG for ; Mon, 10 Oct 2011 06:14:51 -0700 (PDT) Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1RDFgv-00060c-C3; Mon, 10 Oct 2011 13:14:49 +0000 Date: Mon, 10 Oct 2011 09:14:49 -0400 From: Christoph Hellwig To: Dave Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 2/5] repair: fix some valgrind reported errors on i686 Subject: Re: [PATCH 2/5] repair: fix some valgrind reported errors on i686 Message-ID: <20111010131449.GA15671@infradead.org> References: <1318201910-11144-1-git-send-email-david@fromorbit.com> <1318201910-11144-3-git-send-email-david@fromorbit.com> <20111009234529.GA13527@infradead.org> <20111010002017.GQ3159@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111010002017.GQ3159@dastard> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: 173-166-109-252-newengland.hfc.comcastbusiness.net[173.166.109.252] X-Barracuda-Start-Time: 1318252491 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0004 1.0000 -2.0181 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.92 X-Barracuda-Spam-Status: No, SCORE=-1.92 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=RDNS_DYNAMIC X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.76927 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 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?