Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761430Ab2EJStw (ORCPT ); Thu, 10 May 2012 14:49:52 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:44134 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761346Ab2EJStt (ORCPT ); Thu, 10 May 2012 14:49:49 -0400 Message-ID: <1336675787.22495.29.camel@joe2Laptop> Subject: Re: [Bcache v13 11/16] bcache: Core btree code From: Joe Perches To: Kent Overstreet Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, tejun@google.com, agk@redhat.com Date: Thu, 10 May 2012 11:49:47 -0700 In-Reply-To: <1188908028.170.1336674698865.JavaMail.mail@webmail09> References: <1188908028.170.1336674698865.JavaMail.mail@webmail09> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 978 Lines: 43 On Wed, 2012-05-09 at 23:10 -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet [] > + > +void btree_read_done(struct closure *cl) > +{ [] > + if (b->written < btree_blocks(b)) > + bset_init_next(b); > + > + if (0) { > +err: set_btree_node_io_error(b); > + cache_set_error(b->c, "%s at bucket %lu, block %zu, %u keys", > + err, PTR_BUCKET_NR(b->c, &b->key, 0), > + index(i, b), i->keys); > + } Hi Kent trivia: This if (0) is an exceedingly ugly style. I'd much prefer: if (foo) bar(); goto exit; err: set_btree_node_io_error(b); cache_set_error(b->c, "%s at bucket %lu, block %zu, %u keys", err, PTR_BUCKET_NR(b->c, &b->key, 0), index(i, b), i->keys); exit: etc... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/