On Tue, Jan 12, 2016 at 4:23 PM, Andrew Price <anpr...@redhat.com> wrote:
> 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.

It would be helpful to explain the reasons for adding rg_skip in the
patch description.

Thanks,
Andreas

Reply via email to