[Ocfs2-tools-devel] [PATCH 1/4] defrag.ocfs2: Fix alloc_cluster to allocate best clusters

Joel Becker Joel.Becker at oracle.com
Sun Jul 18 02:29:36 PDT 2010


On Tue, May 11, 2010 at 11:02:30PM -0500, Goldwyn Rodrigues wrote:
> alloc_clusters (alloc_range_func) currently scans all bitmap regions.
> However, if it finds a cluster smaller than requested, it stops and
> returns the allocation, instead of checking the rest of the bitmap
> regions to check for a better cluster.
> 
> This fix checks the rest of the bitmap regions to find the best
> possible cluster allocation.
> 
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>

	If I understand this patch correctly, all allocations will
always walk the entire bitmap until they find something contiguous,
correct?  Only after they reach the end will they use the best fit they
found?

Joel

-- 

Life's Little Instruction Book #43

	"Never give up on somebody.  Miracles happen every day."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list