Re: [PATCH v4] erofs: support superblock checksum

From: Gao Xiang
Date: Mon Oct 28 2019 - 09:41:22 EST


Hi Chao,

On Mon, Oct 28, 2019 at 08:36:00PM +0800, Chao Yu wrote:
> On 2019/10/23 16:45, Gao Xiang wrote:

<snip>

> > That is quite a good point. :-)
> >
> > My first thought is to check the following payloads of sb (e.g, some per-fs
> > metadata should be checked at mount time together. or for small images, check
> > the whole image at the mount time) as well since if we introduce a new feature
> > to some kernel version, forward compatibility needs to be considered. So it's
> > better to make proper scalability, for this case, we have some choices:
> > 1) limit `chksum_blocks' upbound at runtime (e.g. refuse >= 65536 blocks,
> > totally 256M.)
> > 2) just get rid of the whole `chksum_blocks' mess and checksum the first 4k
> > at all, don't consider any latter scalability.
>
> Xiang, sorry for later reply...
>
> I prefer method 2), let's enable chksum feature only on superblock first,
> chksum_blocks feature can be added later.

Okay, got it. I will resend patch soon.

Thanks,
Gao Xiang

>
> Thanks,
>
> >
> > Some perferred idea about this? I plan to release erofs-utils v1.0 tomorrow
> > and hold up this feature for the next erofs-utils release, but I think we can
> > get it ready for v5.5 since it is not quite complex feature...
> >
> > Thanks,
> > Gao Xiang
> >
> > .
> >