ocfs2: Count more refcount records in file system fragmentation.
authorTao Ma <tao.ma@oracle.com>
Thu, 22 Jul 2010 05:56:45 +0000 (13:56 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:41:36 +0000 (16:41 -0700)
commit92b18cf37399230c74b2e9d547fb5fa9a375d3c4
treea2a4ae32961fe187fbfa0bb248a44a2cc83e8474
parente293f896c883912f082613b0e3acaaacf489b2c9
ocfs2: Count more refcount records in file system fragmentation.

commit 8a2e70c40ff58f82dde67770e6623ca45f0cb0c8 upstream.

The refcount record calculation in ocfs2_calc_refcount_meta_credits
is too optimistic that we can always allocate contiguous clusters
and handle an already existed refcount rec as a whole. Actually
because of file system fragmentation, we may have the chance to split
a refcount record into 3 parts during the transaction. So consider
the worst case in record calculation.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ocfs2/refcounttree.c