[Cluster-devel] [PATCH 2/3] gfs2: Add rindex fields to rgrp headers

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


On 07/12/17 13:18, Bob Peterson wrote:
> Hi,
> 
> ----- Original Message -----
> | Add rg_data0, rg_data and rg_bitbytes to struct gfs2_rgrp. The fields
> | are identical to their counterparts in struct gfs2_rindex and are
> | intended to reduce the use of the rindex. For now the fields are only
> | written back as the in-memory equivalents in struct gfs2_rgrpd are set
> | using values from the rindex. However, they are needed at this point so
> | that userspace can make use of them, allowing a migration away from the
> | rindex over time.
> |
> | The new fields take up previously reserved space which was explicitly
> | zeroed on write so, in clusters with mixed kernels, these fields could
> | get zeroed after being set and this should not be treated as an error.
> |
> | Signed-off-by: Andrew Price <anprice at redhat.com>
> (snip)
> | @@ -1053,6 +1054,10 @@ static void gfs2_rgrp_out(struct gfs2_rgrpd *rgd, void
> | *buf)
> |  	if (next != NULL && next->rd_addr > rgd->rd_addr)
> |  		str->rg_skip = cpu_to_be32(next->rd_addr - rgd->rd_addr);
> |  	str->rg_igeneration = cpu_to_be64(rgd->rd_igeneration);
> | +	str->rg_data0 = cpu_to_be64(rgd->rd_data0);
> | +	str->rg_data = cpu_to_be64(rgd->rd_data);
> | +	str->rg_bitbytes = cpu_to_be64(rgd->rd_bitbytes);
> 
> These last two should be cpu_to_be32() not 64()

D'oh! Fixed.

Thanks,
Andy




More information about the Cluster-devel mailing list