ocfs2: Count more refcount records in file system fragmentation.
commitbc8a22fb9d870dd45202d3fbcf53f77f3b7e2a3a
authorTao Ma <tao.ma@oracle.com>
Thu, 22 Jul 2010 05:56:45 +0000 (22 13:56 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:20 +0000 (26 16:43 -0700)
tree848cd68fb7e19a970f7a2e430649fde617cc51a6
parent5509b7d7cae6cb8560f531146570949734116caf
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