ocfs2: Trim suballocations if they cross discontiguous regions
authorJoel Becker <joel.becker@oracle.com>
Fri, 26 Mar 2010 02:08:27 +0000 (10:08 +0800)
committerTao Ma <tao.ma@oracle.com>
Fri, 26 Mar 2010 02:08:27 +0000 (10:08 +0800)
A discontiguous block group can find a range of free bits that straddle
more than one region of its space.  Callers can't handle that, so we
trim the returned bits until they fit within one region.

Only cluster allocations ask for min_bits>1.  Discontiguous block groups
are only for block allocations.  So min_bits doesn't matter here.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/suballoc.c

Simple merge