On 12/01/16 12:39, Andreas Gruenbacher wrote:
On Tue, Jan 12, 2016 at 12:39 PM, Andrew Price <anpr...@redhat.com> wrote:
Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The
rg_skip field has the following meaning:
- If rg_skip is zero, it is considered unset and not useful.
- If rg_skip is non-zero, its value will be the number of blocks between
this rgrp's address and the next rgrp's address. This can be used as a
hint by fsck.gfs2 when rebuilding a bad rindex, for example.
How is that better than a resource group size field that wouldn't need
to special case the last resource group?
The last block of the mapped space in a resource group (ri_data0 +
ri_data) is not necessarily at the block address immediately preceding
the next resource group, due to device alignment and bitmap rounding.
Also, if we assume we know the position of the first new resource group
that would be created by gfs2_grow then we might get it wrong, so we
can't set the final resource group's rg_skip to a useful value.
Andy