[Cluster-devel] [PATCH] GFS2: Add a next-resource-group pointer to resource groups

Andrew Price anprice at redhat.com
Tue Jan 12 15:23:39 UTC 2016


On 12/01/16 13:30, Andreas Gruenbacher wrote:
> Is it guaranteed that the kernel will never set the new rg_skip field
> if it hasn't verified that the next resource group is where it thinks
> it is?

No, but rg_skip is set from the ri_addr of the next resource group in 
the rindex and gfs2 generally trusts the rindex so if it's corrupt then 
there'll be other problems down the line.

> Otherwise we could end up with incorrect fsck "hints" for
> corrupted filesystems, which would make things worse.

I don't think it would make things worse. fsck.gfs2 will be able to 
check whether the rg_skip field is correct by checking it against the 
rindex and whether there's an rgrp where it's pointing (and checking 
that it's within a sensible range). Before, we only had the rindex and 
the rgrp header to check against each other but now we have a third factor.

That said, the fsck.gfs2 case is only one of the ways this would be 
useful. The original plan was to generally reduce dependence on the 
rindex, effectively allowing us to iterate over all rgrps without 
reading it in. Though I don't recall the specific issue which motivated 
it, I can think of cases where it would improve things.

Andy




More information about the Cluster-devel mailing list