ocfs2: properly set and use inode group alloc hint
authorMark Fasheh <mfasheh@suse.com>
Thu, 26 Aug 2010 20:06:50 +0000 (13:06 -0700)
committerTao Ma <tao.ma@oracle.com>
Wed, 8 Sep 2010 06:25:56 +0000 (14:25 +0800)
commitb2b6ebf5f740e015b2155343958f067e594323ea
treec235f91c504cb95ce0b7b4a5c3cfed1df185eb88
parent889f004a8c83d515f275078687f859bc0d5ede9d
ocfs2: properly set and use inode group alloc hint

We were setting ac->ac_last_group in ocfs2_claim_suballoc_bits from
res->sr_bg_blkno.  Unfortunately, res->sr_bg_blkno is going to be zero under
normal (non-fragmented) circumstances. The discontig block group patches
effectively turned off that feature. Fix this by correctly calculating what
the next group hint should be.

Acked-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Tested-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
fs/ocfs2/suballoc.c