[Ocfs2-tools-devel] [PATCH 06/22] libocfs2: Make ocfs2_init_group_desc aware of discontig group.

Tao Ma tao.ma at oracle.com
Thu Apr 1 17:08:17 PDT 2010


Joel Becker wrote:
> On Thu, Apr 01, 2010 at 04:54:07PM -0700, Mark Fasheh wrote:
>   
>> On Thu, Apr 01, 2010 at 03:21:04AM -0700, Joel Becker wrote:
>>     
>>> 	It's better if we have a way to know the group descriptor is
>>> discontiguous without knowing the inode and superblock.  Then the
>>> feature tests are mere sanity.
>>> 	We can add bg_flags as you describe above.  Another option is to
>>> see that bg_bitmap + bg_size == offsetof(bg_list).  Both work.  The
>>> former is more descriptive, the latter is less invasive.  Which works
>>> for you?  Mark?
>>>       
>> I think doing it this way (bg_size + bg_bitmap) is fine - bg_size is
>> identical on all ocfs2 volumes at their given clustersize / block size, so
>> the test you describe above would always work. And we'd get to save on some
>> already-small fields in our allocation groups.
>>     
>
> 	Works for me.  Now we can key on ocfs2_gd_is_discontig() instead
> of !ocfs2_is_cluster_alloc() && ocfs2_supports_discontig_bg() &&
> bg_list.l_next_free_rec.
>   
check offset(bg_bitmap) + bg_size == offsetof(bg_list)
 =>
check bg_size== OCFS2_MAX_BG_BITMAP_SIZE .

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list