]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2: Tighten free bit calculation in the global bitmap
authorSunil Mushran <sunil.mushran@oracle.com>
Tue, 8 Nov 2011 21:00:19 +0000 (13:00 -0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 23 Mar 2012 01:40:06 +0000 (18:40 -0700)
commit2cd1ca35b44490e0300f275dad7aa8b0ba86085c
tree0f3460782180f48f2e97de84e6a5e6f0b85a3124
parent404b538bea9efc5bda96dbe7bc9be07775bde1e5
ocfs2: Tighten free bit calculation in the global bitmap

When clearing bits in the global bitmap, we do not test the current bit value.
This patch tightens the code by considering the possiblity that the bit being
cleared was already cleared.

Now this should not happen. But we are seeing stray instances in which free
bit count in the global bitmap exceeds the total bit count. In each instance
the bitmap is correct. Only the free bit count is incorrect.

This patch checks the current bit value and increments the free bit count
only if the bit was previously set. It also prints information to allow
us to debug further.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
fs/ocfs2/suballoc.c