Hi Ju Hyung,

Sorry for the delay.

On 2018/12/9 20:51, Ju Hyung Park wrote:
> Hi,
> 
> I was testing around the "extended node bitmap" feature within f2fs
> and found an issue with fsck.f2fs resulting in false-positives
> and causing further corruptions when data is written by older kernels.
> 
> I can reliably reproduce this issue with a simple image creation
> and fsck with Linux 4.15.
> 
> # fallocate -l 2G f2fs.img
> # mkfs.f2fs -i f2fs.img
> # mount f2fs.img /mnt
> # rsync -a /var/ /mnt/
> # umount /mnt
> # fsck.f2fs -f --dry-run f2fs.img
> 
> This results in the following behavior with the latest f2fs-tools
> v1.12.0 and Linux 4.15:
> https://pastebin.com/MTKpa2AC
> (A side note, 2nd run of fsck still shows some errors being fixed.)
> 
> I cannot reproduce this issue with Linux 4.19.
> Is this new feature supposed to be only used with recent kernels?

That's correct, the feature was enabled in Linux 4.17 kernel, so the image
should be fit for 4.17+ kernel.

> 
> If so, mount should be prevented on older kernels, at least writes.
> (I'm noticing reads are fine with older kernels.)

I guess it will be a little hard for old kernel to be aware of such image
with new feature, since different kernel support different features, we
have to:
- adjust all old kernels to recognize the features they don't support.
- once new feature is introduced in mkfs, we need to adjust all old kernels..

So the easy way I can imagine is that, during mkfs or in documentation, we
can remind user the lowest version of kernel for the feature user want to
use, then user can select kernel with correct version to match the image.

Thanks,

> 
> Thanks,
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> 
> 



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to