lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 01/12] DRBD: lru_cache
Date
On Wednesday 08 April 2009 12:15:13 Nikanth K wrote:
> On Mon, Mar 23, 2009 at 9:17 PM, Philipp Reisner
>
> <philipp.reisner@linbit.com> wrote:
> > +/* this is developers aid only! */
> > +#define PARANOIA_ENTRY() BUG_ON(test_and_set_bit(__LC_PARANOIA,
> > &lc->flags)) +#define PARANOIA_LEAVE() do { clear_bit(__LC_PARANOIA,
> > &lc->flags); smp_mb__after_clear_bit(); } while (0) +#define RETURN(x...)
> >     do { PARANOIA_LEAVE(); return x ; } while (0) +
>
> The PARANOIA_LEAVE is used for void functions, so RETURN can be
> changed to take a simple non-variadic argument. Or empty RETURN()
> could be used everywhere instead of mixing PARANOIA_LEAVE() and
> RETURN(). Just to make it consistent.

Ok, using the RETURN() now everywhere.

> Also this could be made as nop based on some config debug option?
>

It is a very cheap debugging code, setting and clearing a single bit, just
to make sure the function calls of the lru-cache API are used in the right
order.

Since it is that cheap I decided to have it permanently in, but if
I get that hint twice, I will change it into a config debug option.

-Phil
--
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.

--
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/

\
 
 \ /
  Last update: 2009-04-08 17:15    [W:0.159 / U:0.532 seconds]
©2003-2014 Jasper Spaans. Advertise on this site