Re: GFS, what's remaining

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux