Re: [PATCH] Add error handling to minix filesystem similar to ext4

From: Jan Kara

Date: Thu Oct 30 2025 - 13:01:14 EST


Hi Jori!

On Thu 30-10-25 13:22:53, Jori Koolstra wrote:
> > The patch looks ok to me but since minix filesystem driver is in the kernel
> > mostly to allow mounting ancient unix filesystems I don't quite understand
> > the motivation for adding the new mount options. Why not just fixup
> > minix_rmdir() to better handle corrupted filesystems?
> >
> > Honza
>
> I am doing the Linux kernel mentorship program, and was looking to contribute
> to fs. Since I saw a lot bugs on syzbot related to minix (and jfs too) not
> handling corruptions well (yielding warnings in drop_nlink e.g.) I figured
> it was a low stakes project, not completely trivial, yet within my scope, to
> attempt to implement what ext4 does for these kind of problems (and jfs
> implements the same opts too).

Well, one thing is handling corruption well - that part of your patch was
fine and I think it is still useful - another thing are the mount options
that allow to configure what happens when we find a corruption - and that
is the part I don't think really makes a lot of sense for minix.

> I would have asked about the exact status of minix, but was told not to
> bother maintainers without a patch. I would be open with trying to improve
> minix further, but of course if there are better options to get it out of
> the kernel altogether that may be better. Sad for me, since that means still
> zero patches, but that is not your problem :)

Your fix for minix_rmdir() is needed. If minix is going out of the kernel
is uncertain and even if that happens it will certainly need some
deprecation period so functional fixes are still wanted in that period.

> Anyway, I hope this clarifies why I submitted this patch.

Fully, thanks for the clarification and your work on Linux :)

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR