[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 01/12] DRBD: lru_cache
On Wednesday 08 April 2009 12:15:13 Nikanth K wrote:
> On Mon, Mar 23, 2009 at 9:17 PM, Philipp Reisner
> <> 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

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.

: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82

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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-04-08 17:15    [W:0.077 / U:2.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site