Re: [PATCH] fat: ignore .. subdir and always add a link to dirs

From: Thadeu Lima de Souza Cascardo
Date: Mon Mar 04 2024 - 18:37:43 EST


On Wed, Feb 28, 2024 at 06:10:29AM -0300, Thadeu Lima de Souza Cascardo wrote:
> On Wed, Feb 28, 2024 at 12:38:43PM +0900, OGAWA Hirofumi wrote:
> > Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxx> writes:
> >
> > >> There are many corrupted images, and attacks. Allowing too wide is
> > >> danger for fs.
> > >>
> > >> BTW, this image works and pass fsck on windows? When I quickly tested
> > >> ev3fs.zip (https://github.com/microsoft/pxt-ev3/issues/980) on windows
> > >> on qemu, it didn't seem recognized as FAT. I can wrongly tested though.
> > >>
> > >> Thanks.
> > >> --
> > >> OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
> > >
> > > The test image I managed to create mounts just fine on Windows. New
> > > subdirectories can be created there just as well.
> >
> > Can you share the image somehow? And fsck (chkdsk, etc.) works without
> > any complain?
> >
> > Thanks.
> > --
> > OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
>
> Checking the filesystem on Windows runs without any complains, but it turns the
> directory into an useless lump of data. Without checking the filesystem,
> creating and reading files from that directory works just fine.
>
> I tried to use gzip or xz to compress the very sparse filesystem image that I
> got, but they made it larger on disk than it really was. So here is a script
> and pieces of the filesystem that will create a sparse 8GB image.
>
> Thank you for looking into this.
> Cascardo.

Hi, OGAWA Hirofumi.

What are your thoughts here? Should we make it possible to read such
filesystems? Is the proposed approach acceptable?

Thanks.
Cascardo.