From: =?iso-8859-1?Q?J=F6rn?= Engel Subject: Re: GFS, what's remaining Date: Fri, 2 Sep 2005 13:46:09 +0200 Message-ID: <20050902114609.GA11059@wohnheim.fh-wedel.de> References: <20050901104620.GA22482@redhat.com> <1125574523.5025.10.camel@laptopd505.fenrus.org> <20050902094403.GD16595@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Arjan van de Ven , linux-fsdevel@vger.kernel.org, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-cluster@redhat.com Return-path: Received: from mail.fh-wedel.de ([213.39.232.198]:40075 "EHLO moskovskaya.fh-wedel.de") by vger.kernel.org with ESMTP id S1751215AbVIBLqc (ORCPT ); Fri, 2 Sep 2005 07:46:32 -0400 To: David Teigland Content-Disposition: inline In-Reply-To: <20050902094403.GD16595@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 2 September 2005 17:44:03 +0800, David Teigland wrote: > On Thu, Sep 01, 2005 at 01:35:23PM +0200, Arjan van de Ven wrote: >=20 > > + gfs2_assert(gl->gl_sbd, atomic_read(&gl->gl_count) > 0,); >=20 > > what is gfs2_assert() about anyway? please just use BUG_ON directly > > everywhere >=20 > When a machine has many gfs file systems mounted at once it can be us= eful > to know which one failed. Does the following look ok? >=20 > #define gfs2_assert(sdp, assertion) = \ > do { = \ > if (unlikely(!(assertion))) { = \ > printk(KERN_ERR = \ > "GFS2: fsid=3D%s: fatal: assertion \"%s\" fai= led\n" \ > "GFS2: fsid=3D%s: function =3D %s\n" = \ > "GFS2: fsid=3D%s: file =3D %s, line =3D %u\= n" \ > "GFS2: fsid=3D%s: time =3D %lu\n", = \ > sdp->sd_fsname, # assertion, = \ > sdp->sd_fsname, __FUNCTION__, = \ > sdp->sd_fsname, __FILE__, __LINE__, = \ > sdp->sd_fsname, get_seconds()); = \ > BUG(); = \ > } = \ > } while (0) That's a lot of string constants. I'm not sure how smart current versions of gcc are, but older ones created a new constant for each invocation of such a macro, iirc. So you might want to move the code out of line. J=F6rn --=20 There's nothing better for promoting creativity in a medium than making an audience feel "Hmm =AD I could do better than that!" -- Douglas Adams in a slashdot interview - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html