2023-09-22 12:12:09

by Ian Kent

[permalink] [raw]
Subject: [PATCH 0/8] autofs - convert to to use mount api

There was a patch from David Howells to convert autofs to use the mount
api but it was never merged.

I have taken David's patch and refactored it to make the change easier
to review in the hope of having it merged.

Signed-off-by: Ian Kent <[email protected]>

Ian Kent (8):
autofs: refactor autofs_prepare_pipe()
autofs: add autofs_parse_fd()
autofs: refactor super block info init
autofs: reformat 0pt enum declaration
autofs: refactor parse_options()
autofs: validate protocol version
autofs: convert autofs to use the new mount api
autofs: fix protocol sub version setting

fs/autofs/autofs_i.h | 15 +-
fs/autofs/init.c | 9 +-
fs/autofs/inode.c | 423 +++++++++++++++++++++++++------------------
3 files changed, 266 insertions(+), 181 deletions(-)

--
2.41.0


2023-09-22 12:21:40

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH 0/8] autofs - convert to to use mount api

On Fri, 22 Sep 2023 12:12:07 +0800, Ian Kent wrote:
> There was a patch from David Howells to convert autofs to use the mount
> api but it was never merged.
>
> I have taken David's patch and refactored it to make the change easier
> to review in the hope of having it merged.
>
> Signed-off-by: Ian Kent <[email protected]>
>
> [...]

Applied to the vfs.autofs branch of the vfs/vfs.git tree.
Patches in the vfs.autofs 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.autofs

[1/8] autofs: refactor autofs_prepare_pipe()
https://git.kernel.org/vfs/vfs/c/a1388470620f
[2/8] autofs: add autofs_parse_fd()
https://git.kernel.org/vfs/vfs/c/917c4dd6e625
[3/8] autofs: refactor super block info init
https://git.kernel.org/vfs/vfs/c/81a57bf0af7c
[4/8] autofs: reformat 0pt enum declaration
https://git.kernel.org/vfs/vfs/c/34539aa9def8
[5/8] autofs: refactor parse_options()
https://git.kernel.org/vfs/vfs/c/805b2411ca1c
[6/8] autofs: validate protocol version
https://git.kernel.org/vfs/vfs/c/89405b46e168
[7/8] autofs: convert autofs to use the new mount api
https://git.kernel.org/vfs/vfs/c/7bf383b78c56
[8/8] autofs: fix protocol sub version setting
https://git.kernel.org/vfs/vfs/c/10afd722e290

2023-09-22 15:54:23

by Ian Kent

[permalink] [raw]
Subject: [PATCH 8/8] autofs: fix protocol sub version setting

There were a number of updates to protocol version 4, take account of
that when setting the super block info sub version field.

Signed-off-by: Ian Kent <[email protected]>
---
fs/autofs/inode.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 3f2dfed428f9..53c0df354206 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -279,7 +279,17 @@ static int autofs_validate_protocol(struct fs_context *fc)
sbi->version = AUTOFS_MAX_PROTO_VERSION;
else
sbi->version = sbi->max_proto;
- sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
+
+ switch (sbi->version) {
+ case 4:
+ sbi->sub_version = 7;
+ break;
+ case 5:
+ sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
+ break;
+ default:
+ sbi->sub_version = 0;
+ }

return 0;
}
--
2.41.0

2023-09-22 17:13:13

by Bill O'Donnell

[permalink] [raw]
Subject: Re: [PATCH 0/8] autofs - convert to to use mount api

On Fri, Sep 22, 2023 at 12:12:07PM +0800, Ian Kent wrote:
> There was a patch from David Howells to convert autofs to use the mount
> api but it was never merged.
>
> I have taken David's patch and refactored it to make the change easier
> to review in the hope of having it merged.
>
> Signed-off-by: Ian Kent <[email protected]>

for the series...
Reviewed-by: Bill O'Donnell <[email protected]>


>
> Ian Kent (8):
> autofs: refactor autofs_prepare_pipe()
> autofs: add autofs_parse_fd()
> autofs: refactor super block info init
> autofs: reformat 0pt enum declaration
> autofs: refactor parse_options()
> autofs: validate protocol version
> autofs: convert autofs to use the new mount api
> autofs: fix protocol sub version setting
>
> fs/autofs/autofs_i.h | 15 +-
> fs/autofs/init.c | 9 +-
> fs/autofs/inode.c | 423 +++++++++++++++++++++++++------------------
> 3 files changed, 266 insertions(+), 181 deletions(-)
>
> --
> 2.41.0
>