ubifs: assertion fails

Dolev Raviv draviv at codeaurora.org
Mon Mar 24 02:03:48 EDT 2014


Hi all,

I’m doing my first steps learning ubifs and I’m trying to understand a
something that does not make much sense to me.

In fs/ubifs/shrinker.c, at shrink_tnc(), there is an assert condition that
shows up every once I a while (after stressing).
ubifs_assert(atomic_long_read(&c->clean_zn_cnt) >= 0);

In another place in the same file in the function ubifs_shrinker(), I
found the following comment:
/*
* Due to the way UBIFS updates the clean znode counter it may
* temporarily be negative.
*/

Could the assertion condition be wrong?
Can anyone share information on what are those times that the counter can
be negative?

Thanks,
Dolev
-- 
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation




More information about the linux-mtd mailing list