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)
commit13e434cf0cacd2f03a7f4cd077e3e995ef5ef710
treee13c0131deb1409c4445242cef52c5fda97a170f
parentaa8f8e93c898a0319bcd6c79a9a42fe52abac7d7
ocfs2: Trim suballocations if they cross discontiguous regions

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