]> 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)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:30:26 +0000 (08:30 -0700)
commite877a706a50af7ff22e2ce5ba949b493b8b5a6d8
tree48711b3779c55e0cfffa074515be7f080d2c2787
parent34419e0fa1118b1adb4a21b98fe83ac279eb78a4
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.

Orabug: 17342255

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
(cherry picked from commit d1726d8617f7d27c54d12b50c9a20b248ebd0c66)
fs/ocfs2/suballoc.c