[Cluster-devel] [PATCH 4/8] mkfs.gfs2: Set the rg_skip field in new rgrps

Andrew Price anprice at redhat.com
Thu Dec 7 14:14:02 UTC 2017



On 07/12/17 13:29, Bob Peterson wrote:
> ----- Original Message -----
> | This field is the difference between the block address of a rgrp and the
> | next one. Includes a test to check the rg_skip field against the rindex.
> |
> | Signed-off-by: Andrew Price <anprice at redhat.com>
> | ---
> (snip)
> | @@ -615,6 +616,9 @@ lgfs2_rgrp_t lgfs2_rgrps_append(lgfs2_rgrps_t rgs, struct
> | gfs2_rindex *entry)
> |  	rg->rg.rg_header.mh_type = GFS2_METATYPE_RG;
> |  	rg->rg.rg_header.mh_format = GFS2_FORMAT_RG;
> |  	rg->rg.rg_free = rg->ri.ri_data;
> | +#ifdef GFS2_HAS_RG_SKIP
> | +	rg->rg.rg_skip = rg_skip;
> | +#endif
> 
> We may still want to initialize the value of rg_skip if the #ifdef is false.

The structure is allocated and zeroed with calloc() in that function and 
rg_skip doesn't exist outside of the #ifdef so we're ok here.

> The rest looked good.

Cheers,
Andy




More information about the Cluster-devel mailing list