From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Subject: Re: GFS, what's remaining Date: Fri, 2 Sep 2005 17:44:03 +0800 Message-ID: <20050902094403.GD16595@redhat.com> References: <20050901104620.GA22482@redhat.com> <1125574523.5025.10.camel@laptopd505.fenrus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-cluster@redhat.com Return-path: To: Arjan van de Ven Content-Disposition: inline In-Reply-To: <1125574523.5025.10.camel@laptopd505.fenrus.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Sep 01, 2005 at 01:35:23PM +0200, Arjan van de Ven wrote: > + gfs2_assert(gl->gl_sbd, atomic_read(&gl->gl_count) > 0,); > what is gfs2_assert() about anyway? please just use BUG_ON directly > everywhere When a machine has many gfs file systems mounted at once it can be useful to know which one failed. Does the following look ok? #define gfs2_assert(sdp, assertion) \ do { \ if (unlikely(!(assertion))) { \ printk(KERN_ERR \ "GFS2: fsid=%s: fatal: assertion \"%s\" failed\n" \ "GFS2: fsid=%s: function = %s\n" \ "GFS2: fsid=%s: file = %s, line = %u\n" \ "GFS2: fsid=%s: time = %lu\n", \ sdp->sd_fsname, # assertion, \ sdp->sd_fsname, __FUNCTION__, \ sdp->sd_fsname, __FILE__, __LINE__, \ sdp->sd_fsname, get_seconds()); \ BUG(); \ } \ } while (0)