[Ocfs2-tools-devel] [PATCH 10/20] bitmap: Add 2 fields to facilitate discontiguous block group.

Joel Becker Joel.Becker at oracle.com
Thu Jun 10 22:55:20 PDT 2010


On Fri, Jun 11, 2010 at 08:21:53AM +0800, Tao Ma wrote:
> We use ocfs2_bitmap to indicate the whole bitmap region and rb-tree
> is used here.
> So for the first [1000, 200], we call ocfs2_bitmap_insert_region to
> insert a rb-node
> which have [1000,200]. So for the 2nd group
> ocfs2_bitmap_insert_region will call
> ocfs2_bitmap_lookup to find one. And look at this line:
> 
> /* we shouldn't find an existing region that intersects our new one */
>        br_tmp = ocfs2_bitmap_lookup(bitmap, br->br_start_bit,
>                                     br->br_total_bits, &p, &parent, NULL);
>        if (br_tmp)
>                return OCFS2_ET_INVALID_BIT;

	Ok, I see that.  Urgh.  Well, that bitmap code is way
overengineered and silly.  I can say that - I wrote it. ;-)
	Let's leave it as you wrote it.  If we find other problems, we
can always change it later.

Joel

-- 

"There is no more evil thing on earth than race prejudice, none at 
 all.  I write deliberately -- it is the worst single thing in life 
 now.  It justifies and holds together more baseness, cruelty and
 abomination than any other sort of error in the world." 
        - H. G. Wells

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



More information about the Ocfs2-tools-devel mailing list