UBIFS: fix debugging failure in dbg_check_space_info
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 4 Apr 2011 14:16:39 +0000 (17:16 +0300)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:41:04 +0000 (11:41 -0700)
commit0dd33136998851bc59c77f93b137a68c95b73f4e
treed29c3a46f0aad301f2ead145c3de5d3f1be21d1c
parentc7e068140e39ecf13c2a26dd6c1681928bcbb621
UBIFS: fix debugging failure in dbg_check_space_info

BugLink: http://bugs.launchpad.net/bugs/761134

commit 7da6443aca9be29c6948dcbd636ad50154d0bc0c upstream.

This patch fixes a debugging failure with which looks like this:
UBIFS error (pid 32313): dbg_check_space_info: free space changed from 6019344 to 6022654

The reason for this failure is described in the comment this patch adds
to the code. But in short - 'c->freeable_cnt' may be different before
and after re-mounting, and this is normal. So the debugging code should
make sure that free space calculations do not depend on 'c->freeable_cnt'.

A similar issue has been reported here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034647.html

This patch should fix it.

For the -stable guys: this patch is only relevant for kernels 2.6.30
onwards.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/ubifs/debug.c