Re: [PATCH] Revert "fat: add simple validation for directory inode"

From: OGAWA Hirofumi
Date: Sat Feb 05 2022 - 01:21:25 EST


Gwendal Grignou <gwendal@xxxxxxxxxxxx> writes:

> This reverts commit a3082d526f2d406d4b488e49a508a0062a23314f.
>
> The reverted commit adds check for FAT images. However, the tools used
> for creating images for the Lego Mindstrom EV3 are not adding '.' and
> '..' entry in the 'Projects' directory.
> Without this fix, the kernel can not fill the inode structure for
> 'Projects' directory.
>
> See https://github.com/microsoft/pxt-ev3/issues/980
> And https://github.com/microsoft/uf2-linux/issues/6

Looks like the bug of those tools. If you want to add the workaround for
those tools, it should not break sane format.

I.e. the workaround should at least set the directory link count to work
rmdir(2) without warnings, then should test other operations if works
well.

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>