[Cluster-devel] [PATCH 2/4] mkfs.gfs2: Align resource groups to RAID stripes

Andrew Price anprice at redhat.com
Thu Jun 6 15:17:51 UTC 2013


On 06/06/13 14:11, Steven Whitehouse wrote:
> It has never been valid to assume that all the rgrps are the same size.
> It may be useful as a hint, but we should not be relying on that being
> true. Obviously it makes sense to try and keep them to an even spacing
> where possible but we must allow for them to be placed and sized
> independently as required for alignment, etc.
>
> There are some restrictions on rgrp length as they need to be aligned
> such as to give an integer number of bitmap bytes, and in fact it would
> be good if that could be further enforced to ensure that all rgrp
> bitmaps are an integer number of 64 bit words in length (so a multiple
> of 32 blocks, excluding the headers). So depending on the various
> restrictions, there may be a few unused blocks between rgrps in some
> cases.

This is on my to-do list and should be a case of changing the "& 
~(uint32_t)3" parts of rgblocks2bitblocks() but I wanted to make sure 
that won't break fsck for older file systems first.

> It would be worth abstracting the details about alignment from mkfs in
> due course, so that fsck also has access to the same information about
> where rgrps are likely to have been put, I think.

Yes, I need to move the new rgrp creation bits from mkfs into libgfs2 
now so that's going to mean updating the other tools to use them 
eventually (hold onto your hats!).

> Some further thoughts:
>
>   - Would it be useful to introduce a flag to show the source of an rgrp
> (whether mkfs or gfs2_grow) ?
>   - Would it be useful to add a creation date stamp to each rgrp so that
> we can see when things have happened in the past?

Both sound good to me.

Andy




More information about the Cluster-devel mailing list