mbox series

[V2,0/3] fat: convert to the new mount API

Message ID ec599fc8-b32e-48cf-ac6c-09ded36468d5@redhat.com (mailing list archive)
Headers show
Series fat: convert to the new mount API | expand

Message

Eric Sandeen July 2, 2024, 10:39 p.m. UTC
This short series converts the fat/vfat/msdos filesystem to use the
new mount API.

V2 addresses the issues raised with the 2nd patch in the first series,
details are in patch this time.

I've tested it with a hacky shell script found at 

https://gist.github.com/sandeen/3492a39c3f2bf16d1ccdd2cd1c681ccd

which tries every possible option, including some with invalid values,
on both vfat and msdos mounts. It then tests random combinations of
2, 3, and 4 options, including possibly invalid options.

I captured stdout from two runs with and without these modifications,
and the results are identical.

As patch 2 notes, I left codepage loading to fill_super(), rather than
validating codepage options as they are parsed. This is because i.e.

mount -o "iocharset=nope,iocharset=iso8859-1"

passes today, due to the last iocharset option being the only one that is
loaded. It might be nice to validate such options as they are parsed, but
doing so would make the above command line fail, so I'm not sure if it's
a good idea. I do have a patch to validate as we parse, if that's desired.

Lastly, the 3rd patch converts to use the new uid/gid helpers as proposed
at https://lore.kernel.org/linux-fsdevel/8dca3c11-99f4-446d-a291-35c50ed2dc14@redhat.com/T/#t
but feel free to squash patches 2 and 3 if you prefer.

Thanks,
-Eric

Comments

Christian Brauner July 3, 2024, 8:49 a.m. UTC | #1
On Tue, 02 Jul 2024 17:39:25 -0500, Eric Sandeen wrote:
> This short series converts the fat/vfat/msdos filesystem to use the
> new mount API.
> 
> V2 addresses the issues raised with the 2nd patch in the first series,
> details are in patch this time.
> 
> I've tested it with a hacky shell script found at
> 
> [...]

Applied to the vfs.mount.api branch of the vfs/vfs.git tree.
Patches in the vfs.mount.api branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.mount.api

[1/3] fat: move debug into fat_mount_options
      https://git.kernel.org/vfs/vfs/c/206d3d8e006c
[2/3] fat: Convert to new mount api
      https://git.kernel.org/vfs/vfs/c/634440b69c7f
[3/3] fat: Convert to new uid/gid option parsing helpers
      https://git.kernel.org/vfs/vfs/c/d02f0bb332d5