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

Tao Ma tao.ma at oracle.com
Thu Jun 10 16:57:54 PDT 2010


Joel Becker wrote:
> On Mon, May 17, 2010 at 04:46:57PM +0800, Tao Ma wrote:
>   
>> For a discontiguous block group, we will have some bitmap
>> region which doesn't start from the bit offset aligned to bytes.
>> And I don't want to create a new bitmap region which start
>> from that bit offset because in that case when we read/write
>> from the original bg->bg_bitmap, we have to shift bits for
>> every bytes in the region. That is too bad.
>>     
>
> 	Why are you creating multiple regions?  A region is a bitmap
> hunk, not a disk hunk.  So you could just have one region with the
> entire gd bitmap, but when you go to use it you could have specific
> get/set functions that know how to read the right blkno.
>   
I was thinking of this, but have to give up finally. It is not easy to 
integrate to our
bitmap region code. ;)
Say one gd has the following extent rec list [1000, 10], 
[1100,10],[1200,10]...[2900,10].
If we unit it to be a bitmap region we will have a [1000,200].
But if we have a chance to have another gd has the following rec list 
[1150,10]...
we will have a [1150, 200]. This will collide with the original one. 
Current bitmap region
code can't handle this by now.

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list