2023-09-21 21:30:30

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(-)

--
Ian


2023-09-21 22:27:36

by Ian Kent

[permalink] [raw]
Subject: [PATCH 4/8] autofs: reformat 0pt enum declaration

The enum of options is only reformated in the patch to convert autofs
to use the mount API so do that now to simplify the conversion patch.

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

diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 992d6cb29707..d2b333c0682a 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -110,9 +110,20 @@ static const struct super_operations autofs_sops = {
.evict_inode = autofs_evict_inode,
};

-enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto,
- Opt_indirect, Opt_direct, Opt_offset, Opt_strictexpire,
- Opt_ignore};
+enum {
+ Opt_err,
+ Opt_direct,
+ Opt_fd,
+ Opt_gid,
+ Opt_ignore,
+ Opt_indirect,
+ Opt_maxproto,
+ Opt_minproto,
+ Opt_offset,
+ Opt_pgrp,
+ Opt_strictexpire,
+ Opt_uid,
+};

static const match_table_t tokens = {
{Opt_fd, "fd=%u"},


2023-09-21 22:55:35

by Ian Kent

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


On 21/9/23 17:13, Christian Brauner wrote:
> On Thu, Sep 21, 2023 at 03:03:26PM +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]>
>> ---
>>
>> 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
>>
> Yeah sure, but I only see 4 patches on the list? Is my setup broken or
> did you accidently forget to send some patches?

Sorry, but no, my email has gone very pair shaped.


The above send failed part way through and I haven't been able to send

anything via the command line since. I'm guessing the email app I'm

using to send this will work and the other email accounts I use will

probably work from an app too but the command line is broken for some

unknown reason.


Please ignore these, I'll send them when I can get my problem fixed ...

*sigh*!


Ian

2023-09-21 22:59:33

by Christian Brauner

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

On Thu, Sep 21, 2023 at 03:03:26PM +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]>
> ---
>
> 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
>

Yeah sure, but I only see 4 patches on the list? Is my setup broken or
did you accidently forget to send some patches?