mbox series

[nfs-utils,v6,0/3] nfsdctl: add a new nfsdctl tool to nfs-utils

Message ID 20240722-nfsdctl-v6-0-1b9d63710eb5@kernel.org (mailing list archive)
Headers show
Series nfsdctl: add a new nfsdctl tool to nfs-utils | expand

Message

Jeff Layton July 22, 2024, 5:01 p.m. UTC
Hi Steve,

Here's an squashed version of the nfsdctl patches, that represents
the latest changes. Let me know if you run into any other problems,
and thanks for helping to test this!

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v6:
- make the default number of threads 16 in autostart
- doc updates

Changes in v5:
- add support for pool-mode setting
- fix up the handling of nfsd_netlink.h in autoconf
- Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org

Changes in v4:
- add ability to specify an array of pool thread counts in nfs.conf
- Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org

Changes in v3:
- split nfsdctl.h so we can include the UAPI header as-is
- squash the patches together that added Lorenzo's version and convert
  it to the new interface
- adapt to latest version of netlink interface changes
  + have THREADS_SET/GET report an array of thread counts (one per pool)
  + pass scope in as a string to THREADS_SET instead of using unshare() trick

Changes in v2:
- Adapt to latest kernel netlink interface changes (in particular, send
  the leastime and gracetime when they are set in the config).
- More help text for different subcommands
- New nfsdctl(8) manpage
- Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
- Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org

---
Jeff Layton (3):
      nfsdctl: add the nfsdctl utility to nfs-utils
      nfsdctl: asciidoc source for the manpage
      systemd: use nfsdctl to start and stop the nfs server

 configure.ac                 |   19 +
 systemd/nfs-server.service   |    4 +-
 utils/Makefile.am            |    4 +
 utils/nfsdctl/Makefile.am    |   13 +
 utils/nfsdctl/nfsd_netlink.h |   96 +++
 utils/nfsdctl/nfsdctl.8      |  304 ++++++++
 utils/nfsdctl/nfsdctl.adoc   |  158 +++++
 utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
 utils/nfsdctl/nfsdctl.h      |   93 +++
 9 files changed, 2259 insertions(+), 2 deletions(-)
---
base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
change-id: 20240412-nfsdctl-fa8bd8430cfd

Best regards,

Comments

Steve Dickson July 26, 2024, 7:40 p.m. UTC | #1
Hey!

On 7/22/24 1:01 PM, Jeff Layton wrote:
> Hi Steve,
> 
> Here's an squashed version of the nfsdctl patches, that represents
> the latest changes. Let me know if you run into any other problems,
> and thanks for helping to test this!
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v6:
> - make the default number of threads 16 in autostart
> - doc updates
> 
> Changes in v5:
> - add support for pool-mode setting
> - fix up the handling of nfsd_netlink.h in autoconf
> - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> 
> Changes in v4:
> - add ability to specify an array of pool thread counts in nfs.conf
> - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> 
> Changes in v3:
> - split nfsdctl.h so we can include the UAPI header as-is
> - squash the patches together that added Lorenzo's version and convert
>    it to the new interface
> - adapt to latest version of netlink interface changes
>    + have THREADS_SET/GET report an array of thread counts (one per pool)
>    + pass scope in as a string to THREADS_SET instead of using unshare() trick
> 
> Changes in v2:
> - Adapt to latest kernel netlink interface changes (in particular, send
>    the leastime and gracetime when they are set in the config).
> - More help text for different subcommands
> - New nfsdctl(8) manpage
> - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
> - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> 
> ---
> Jeff Layton (3):
>        nfsdctl: add the nfsdctl utility to nfs-utils
>        nfsdctl: asciidoc source for the manpage
>        systemd: use nfsdctl to start and stop the nfs server
> 
>   configure.ac                 |   19 +
>   systemd/nfs-server.service   |    4 +-
>   utils/Makefile.am            |    4 +
>   utils/nfsdctl/Makefile.am    |   13 +
>   utils/nfsdctl/nfsd_netlink.h |   96 +++
>   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>   utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
>   utils/nfsdctl/nfsdctl.h      |   93 +++
>   9 files changed, 2259 insertions(+), 2 deletions(-)
> ---
> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> change-id: 20240412-nfsdctl-fa8bd8430cfd

The patches apply very cleaning and thank you
for squashing them down... but... bring up the
NFS server with 'nfsdctl autostart' v3 is not
being registered with rpcbind which means
v3 mount will not work.

Just curious are you trying support my
idea of deprecating V3 :-) (That's a joke!)

steved.
Jeff Layton July 26, 2024, 9:32 p.m. UTC | #2
On Fri, 2024-07-26 at 15:40 -0400, Steve Dickson wrote:
> Hey!
> 
> On 7/22/24 1:01 PM, Jeff Layton wrote:
> > Hi Steve,
> > 
> > Here's an squashed version of the nfsdctl patches, that represents
> > the latest changes. Let me know if you run into any other problems,
> > and thanks for helping to test this!
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> > Changes in v6:
> > - make the default number of threads 16 in autostart
> > - doc updates
> > 
> > Changes in v5:
> > - add support for pool-mode setting
> > - fix up the handling of nfsd_netlink.h in autoconf
> > - Link to v4:
> > https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> > 
> > Changes in v4:
> > - add ability to specify an array of pool thread counts in nfs.conf
> > - Link to v3:
> > https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> > 
> > Changes in v3:
> > - split nfsdctl.h so we can include the UAPI header as-is
> > - squash the patches together that added Lorenzo's version and
> > convert
> >    it to the new interface
> > - adapt to latest version of netlink interface changes
> >    + have THREADS_SET/GET report an array of thread counts (one per
> > pool)
> >    + pass scope in as a string to THREADS_SET instead of using
> > unshare() trick
> > 
> > Changes in v2:
> > - Adapt to latest kernel netlink interface changes (in particular,
> > send
> >    the leastime and gracetime when they are set in the config).
> > - More help text for different subcommands
> > - New nfsdctl(8) manpage
> > - Patch to make systemd preferentially use nfsdctl instead of
> > rpc.nfsd
> > - Link to v1:
> > https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> > 
> > ---
> > Jeff Layton (3):
> >        nfsdctl: add the nfsdctl utility to nfs-utils
> >        nfsdctl: asciidoc source for the manpage
> >        systemd: use nfsdctl to start and stop the nfs server
> > 
> >   configure.ac                 |   19 +
> >   systemd/nfs-server.service   |    4 +-
> >   utils/Makefile.am            |    4 +
> >   utils/nfsdctl/Makefile.am    |   13 +
> >   utils/nfsdctl/nfsd_netlink.h |   96 +++
> >   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
> >   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
> >   utils/nfsdctl/nfsdctl.c      | 1570
> > ++++++++++++++++++++++++++++++++++++++++++
> >   utils/nfsdctl/nfsdctl.h      |   93 +++
> >   9 files changed, 2259 insertions(+), 2 deletions(-)
> > ---
> > base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> > change-id: 20240412-nfsdctl-fa8bd8430cfd
> 
> The patches apply very cleaning and thank you
> for squashing them down... but... bring up the
> NFS server with 'nfsdctl autostart' v3 is not
> being registered with rpcbind which means
> v3 mount will not work.
> 
> Just curious are you trying support my
> idea of deprecating V3 :-) (That's a joke!)
> 
> steved.
> 

You do need a patched kernel for this:

    https://lore.kernel.org/linux-nfs/Zp5j2DW+2BNaIPif@tissot.1015granger.net/T/#e675642639c59b1c0070f4b19cd03b89cff7983ba

With a patched kernel, I get this with autostart:

[kdevops@kdevops-nfsd ~]$ rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  42104  status
    100024    1   tcp  40159  status
    100003    3   udp   2049  nfs
    100227    3   udp   2049  nfs_acl
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    3   tcp   2049  nfs_acl
    100021    1   udp  46387  nlockmgr
    100021    3   udp  46387  nlockmgr
    100021    4   udp  46387  nlockmgr
    100021    1   tcp  36565  nlockmgr
    100021    3   tcp  36565  nlockmgr
    100021    4   tcp  36565  nlockmgr


Are you seeing different results?
Steve Dickson July 26, 2024, 9:59 p.m. UTC | #3
On 7/26/24 5:32 PM, Jeff Layton wrote:
> On Fri, 2024-07-26 at 15:40 -0400, Steve Dickson wrote:
>> Hey!
>>
>> On 7/22/24 1:01 PM, Jeff Layton wrote:
>>> Hi Steve,
>>>
>>> Here's an squashed version of the nfsdctl patches, that represents
>>> the latest changes. Let me know if you run into any other problems,
>>> and thanks for helping to test this!
>>>
>>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>>> ---
>>> Changes in v6:
>>> - make the default number of threads 16 in autostart
>>> - doc updates
>>>
>>> Changes in v5:
>>> - add support for pool-mode setting
>>> - fix up the handling of nfsd_netlink.h in autoconf
>>> - Link to v4:
>>> https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
>>>
>>> Changes in v4:
>>> - add ability to specify an array of pool thread counts in nfs.conf
>>> - Link to v3:
>>> https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
>>>
>>> Changes in v3:
>>> - split nfsdctl.h so we can include the UAPI header as-is
>>> - squash the patches together that added Lorenzo's version and
>>> convert
>>>     it to the new interface
>>> - adapt to latest version of netlink interface changes
>>>     + have THREADS_SET/GET report an array of thread counts (one per
>>> pool)
>>>     + pass scope in as a string to THREADS_SET instead of using
>>> unshare() trick
>>>
>>> Changes in v2:
>>> - Adapt to latest kernel netlink interface changes (in particular,
>>> send
>>>     the leastime and gracetime when they are set in the config).
>>> - More help text for different subcommands
>>> - New nfsdctl(8) manpage
>>> - Patch to make systemd preferentially use nfsdctl instead of
>>> rpc.nfsd
>>> - Link to v1:
>>> https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
>>>
>>> ---
>>> Jeff Layton (3):
>>>         nfsdctl: add the nfsdctl utility to nfs-utils
>>>         nfsdctl: asciidoc source for the manpage
>>>         systemd: use nfsdctl to start and stop the nfs server
>>>
>>>    configure.ac                 |   19 +
>>>    systemd/nfs-server.service   |    4 +-
>>>    utils/Makefile.am            |    4 +
>>>    utils/nfsdctl/Makefile.am    |   13 +
>>>    utils/nfsdctl/nfsd_netlink.h |   96 +++
>>>    utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>>>    utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>>>    utils/nfsdctl/nfsdctl.c      | 1570
>>> ++++++++++++++++++++++++++++++++++++++++++
>>>    utils/nfsdctl/nfsdctl.h      |   93 +++
>>>    9 files changed, 2259 insertions(+), 2 deletions(-)
>>> ---
>>> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
>>> change-id: 20240412-nfsdctl-fa8bd8430cfd
>>
>> The patches apply very cleaning and thank you
>> for squashing them down... but... bring up the
>> NFS server with 'nfsdctl autostart' v3 is not
>> being registered with rpcbind which means
>> v3 mount will not work.
>>
>> Just curious are you trying support my
>> idea of deprecating V3 :-) (That's a joke!)
>>
>> steved.
>>
> 
> You do need a patched kernel for this:
> 
>      https://lore.kernel.org/linux-nfs/Zp5j2DW+2BNaIPif@tissot.1015granger.net/T/#e675642639c59b1c0070f4b19cd03b89cff7983ba
> 
> With a patched kernel, I get this with autostart:
> 
> [kdevops@kdevops-nfsd ~]$ rpcinfo -p
>     program vers proto   port  service
>      100000    4   tcp    111  portmapper
>      100000    3   tcp    111  portmapper
>      100000    2   tcp    111  portmapper
>      100000    4   udp    111  portmapper
>      100000    3   udp    111  portmapper
>      100000    2   udp    111  portmapper
>      100024    1   udp  42104  status
>      100024    1   tcp  40159  status
>      100003    3   udp   2049  nfs
>      100227    3   udp   2049  nfs_acl
>      100003    3   tcp   2049  nfs
>      100003    4   tcp   2049  nfs
>      100227    3   tcp   2049  nfs_acl
>      100021    1   udp  46387  nlockmgr
>      100021    3   udp  46387  nlockmgr
>      100021    4   udp  46387  nlockmgr
>      100021    1   tcp  36565  nlockmgr
>      100021    3   tcp  36565  nlockmgr
>      100021    4   tcp  36565  nlockmgr
> 
> 
> Are you seeing different results?
Yup
uname -r
6.11.0-0.rc0.20240724git786c8248dbd3.12.fc41.x86_64 (rawhide)

rpcinfo -p
    program vers proto   port  service
     100000    4   tcp    111  portmapper
     100000    3   tcp    111  portmapper
     100000    2   tcp    111  portmapper
     100000    4   udp    111  portmapper
     100000    3   udp    111  portmapper
     100000    2   udp    111  portmapper
     100005    1   udp  20048  mountd
     100005    1   tcp  20048  mountd
     100024    1   udp  38596  status
     100024    1   tcp  60257  status
     100005    2   udp  20048  mountd
     100005    2   tcp  20048  mountd
     100005    3   udp  20048  mountd
     100005    3   tcp  20048  mountd
     100021    1   udp  55966  nlockmgr
     100021    3   udp  55966  nlockmgr
     100021    4   udp  55966  nlockmgr
     100021    1   tcp  40995  nlockmgr
     100021    3   tcp  40995  nlockmgr
     100021    4   tcp  40995  nlockmgr

# mount -o v3 fedora:/home/tmp /mnt/tmp
mount.nfs: requested NFS version or transport protocol is not supported 
for /mnt/tmp

steved.
Jeff Layton July 26, 2024, 10:20 p.m. UTC | #4
On Fri, 2024-07-26 at 17:59 -0400, Steve Dickson wrote:
> 
> On 7/26/24 5:32 PM, Jeff Layton wrote:
> > On Fri, 2024-07-26 at 15:40 -0400, Steve Dickson wrote:
> > > Hey!
> > > 
> > > On 7/22/24 1:01 PM, Jeff Layton wrote:
> > > > Hi Steve,
> > > > 
> > > > Here's an squashed version of the nfsdctl patches, that represents
> > > > the latest changes. Let me know if you run into any other problems,
> > > > and thanks for helping to test this!
> > > > 
> > > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > > ---
> > > > Changes in v6:
> > > > - make the default number of threads 16 in autostart
> > > > - doc updates
> > > > 
> > > > Changes in v5:
> > > > - add support for pool-mode setting
> > > > - fix up the handling of nfsd_netlink.h in autoconf
> > > > - Link to v4:
> > > > https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> > > > 
> > > > Changes in v4:
> > > > - add ability to specify an array of pool thread counts in nfs.conf
> > > > - Link to v3:
> > > > https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> > > > 
> > > > Changes in v3:
> > > > - split nfsdctl.h so we can include the UAPI header as-is
> > > > - squash the patches together that added Lorenzo's version and
> > > > convert
> > > >     it to the new interface
> > > > - adapt to latest version of netlink interface changes
> > > >     + have THREADS_SET/GET report an array of thread counts (one per
> > > > pool)
> > > >     + pass scope in as a string to THREADS_SET instead of using
> > > > unshare() trick
> > > > 
> > > > Changes in v2:
> > > > - Adapt to latest kernel netlink interface changes (in particular,
> > > > send
> > > >     the leastime and gracetime when they are set in the config).
> > > > - More help text for different subcommands
> > > > - New nfsdctl(8) manpage
> > > > - Patch to make systemd preferentially use nfsdctl instead of
> > > > rpc.nfsd
> > > > - Link to v1:
> > > > https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> > > > 
> > > > ---
> > > > Jeff Layton (3):
> > > >         nfsdctl: add the nfsdctl utility to nfs-utils
> > > >         nfsdctl: asciidoc source for the manpage
> > > >         systemd: use nfsdctl to start and stop the nfs server
> > > > 
> > > >    configure.ac                 |   19 +
> > > >    systemd/nfs-server.service   |    4 +-
> > > >    utils/Makefile.am            |    4 +
> > > >    utils/nfsdctl/Makefile.am    |   13 +
> > > >    utils/nfsdctl/nfsd_netlink.h |   96 +++
> > > >    utils/nfsdctl/nfsdctl.8      |  304 ++++++++
> > > >    utils/nfsdctl/nfsdctl.adoc   |  158 +++++
> > > >    utils/nfsdctl/nfsdctl.c      | 1570
> > > > ++++++++++++++++++++++++++++++++++++++++++
> > > >    utils/nfsdctl/nfsdctl.h      |   93 +++
> > > >    9 files changed, 2259 insertions(+), 2 deletions(-)
> > > > ---
> > > > base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> > > > change-id: 20240412-nfsdctl-fa8bd8430cfd
> > > 
> > > The patches apply very cleaning and thank you
> > > for squashing them down... but... bring up the
> > > NFS server with 'nfsdctl autostart' v3 is not
> > > being registered with rpcbind which means
> > > v3 mount will not work.
> > > 
> > > Just curious are you trying support my
> > > idea of deprecating V3 :-) (That's a joke!)
> > > 
> > > steved.
> > > 
> > 
> > You do need a patched kernel for this:
> > 
> >      https://lore.kernel.org/linux-nfs/Zp5j2DW+2BNaIPif@tissot.1015granger.net/T/#e675642639c59b1c0070f4b19cd03b89cff7983ba
> > 
> > With a patched kernel, I get this with autostart:
> > 
> > [kdevops@kdevops-nfsd ~]$ rpcinfo -p
> >     program vers proto   port  service
> >      100000    4   tcp    111  portmapper
> >      100000    3   tcp    111  portmapper
> >      100000    2   tcp    111  portmapper
> >      100000    4   udp    111  portmapper
> >      100000    3   udp    111  portmapper
> >      100000    2   udp    111  portmapper
> >      100024    1   udp  42104  status
> >      100024    1   tcp  40159  status
> >      100003    3   udp   2049  nfs
> >      100227    3   udp   2049  nfs_acl
> >      100003    3   tcp   2049  nfs
> >      100003    4   tcp   2049  nfs
> >      100227    3   tcp   2049  nfs_acl
> >      100021    1   udp  46387  nlockmgr
> >      100021    3   udp  46387  nlockmgr
> >      100021    4   udp  46387  nlockmgr
> >      100021    1   tcp  36565  nlockmgr
> >      100021    3   tcp  36565  nlockmgr
> >      100021    4   tcp  36565  nlockmgr
> > 
> > 
> > Are you seeing different results?
> Yup
> uname -r
> 6.11.0-0.rc0.20240724git786c8248dbd3.12.fc41.x86_64 (rawhide)
> 

Did you patch that kernel by hand then? AFAICT, that git hash doesn't
have the necessary fix. I don't think Chuck has sent a PR to Linus for
it just yet.

> rpcinfo -p
>     program vers proto   port  service
>      100000    4   tcp    111  portmapper
>      100000    3   tcp    111  portmapper
>      100000    2   tcp    111  portmapper
>      100000    4   udp    111  portmapper
>      100000    3   udp    111  portmapper
>      100000    2   udp    111  portmapper
>      100005    1   udp  20048  mountd
>      100005    1   tcp  20048  mountd
>      100024    1   udp  38596  status
>      100024    1   tcp  60257  status
>      100005    2   udp  20048  mountd
>      100005    2   tcp  20048  mountd
>      100005    3   udp  20048  mountd
>      100005    3   tcp  20048  mountd
>      100021    1   udp  55966  nlockmgr
>      100021    3   udp  55966  nlockmgr
>      100021    4   udp  55966  nlockmgr
>      100021    1   tcp  40995  nlockmgr
>      100021    3   tcp  40995  nlockmgr
>      100021    4   tcp  40995  nlockmgr
> 
> # mount -o v3 fedora:/home/tmp /mnt/tmp
> mount.nfs: requested NFS version or transport protocol is not supported 
> for /mnt/tmp
>
Steve Dickson July 27, 2024, 11:28 a.m. UTC | #5
On 7/26/24 6:20 PM, Jeff Layton wrote:
> On Fri, 2024-07-26 at 17:59 -0400, Steve Dickson wrote:
>>
>> On 7/26/24 5:32 PM, Jeff Layton wrote:
>>> On Fri, 2024-07-26 at 15:40 -0400, Steve Dickson wrote:
>>>> Hey!
>>>>
>>>> On 7/22/24 1:01 PM, Jeff Layton wrote:
>>>>> Hi Steve,
>>>>>
>>>>> Here's an squashed version of the nfsdctl patches, that represents
>>>>> the latest changes. Let me know if you run into any other problems,
>>>>> and thanks for helping to test this!
>>>>>
>>>>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>>>>> ---
>>>>> Changes in v6:
>>>>> - make the default number of threads 16 in autostart
>>>>> - doc updates
>>>>>
>>>>> Changes in v5:
>>>>> - add support for pool-mode setting
>>>>> - fix up the handling of nfsd_netlink.h in autoconf
>>>>> - Link to v4:
>>>>> https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
>>>>>
>>>>> Changes in v4:
>>>>> - add ability to specify an array of pool thread counts in nfs.conf
>>>>> - Link to v3:
>>>>> https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
>>>>>
>>>>> Changes in v3:
>>>>> - split nfsdctl.h so we can include the UAPI header as-is
>>>>> - squash the patches together that added Lorenzo's version and
>>>>> convert
>>>>>      it to the new interface
>>>>> - adapt to latest version of netlink interface changes
>>>>>      + have THREADS_SET/GET report an array of thread counts (one per
>>>>> pool)
>>>>>      + pass scope in as a string to THREADS_SET instead of using
>>>>> unshare() trick
>>>>>
>>>>> Changes in v2:
>>>>> - Adapt to latest kernel netlink interface changes (in particular,
>>>>> send
>>>>>      the leastime and gracetime when they are set in the config).
>>>>> - More help text for different subcommands
>>>>> - New nfsdctl(8) manpage
>>>>> - Patch to make systemd preferentially use nfsdctl instead of
>>>>> rpc.nfsd
>>>>> - Link to v1:
>>>>> https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
>>>>>
>>>>> ---
>>>>> Jeff Layton (3):
>>>>>          nfsdctl: add the nfsdctl utility to nfs-utils
>>>>>          nfsdctl: asciidoc source for the manpage
>>>>>          systemd: use nfsdctl to start and stop the nfs server
>>>>>
>>>>>     configure.ac                 |   19 +
>>>>>     systemd/nfs-server.service   |    4 +-
>>>>>     utils/Makefile.am            |    4 +
>>>>>     utils/nfsdctl/Makefile.am    |   13 +
>>>>>     utils/nfsdctl/nfsd_netlink.h |   96 +++
>>>>>     utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>>>>>     utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>>>>>     utils/nfsdctl/nfsdctl.c      | 1570
>>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>>     utils/nfsdctl/nfsdctl.h      |   93 +++
>>>>>     9 files changed, 2259 insertions(+), 2 deletions(-)
>>>>> ---
>>>>> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
>>>>> change-id: 20240412-nfsdctl-fa8bd8430cfd
>>>>
>>>> The patches apply very cleaning and thank you
>>>> for squashing them down... but... bring up the
>>>> NFS server with 'nfsdctl autostart' v3 is not
>>>> being registered with rpcbind which means
>>>> v3 mount will not work.
>>>>
>>>> Just curious are you trying support my
>>>> idea of deprecating V3 :-) (That's a joke!)
>>>>
>>>> steved.
>>>>
>>>
>>> You do need a patched kernel for this:
>>>
>>>       https://lore.kernel.org/linux-nfs/Zp5j2DW+2BNaIPif@tissot.1015granger.net/T/#e675642639c59b1c0070f4b19cd03b89cff7983ba
>>>
>>> With a patched kernel, I get this with autostart:
>>>
>>> [kdevops@kdevops-nfsd ~]$ rpcinfo -p
>>>      program vers proto   port  service
>>>       100000    4   tcp    111  portmapper
>>>       100000    3   tcp    111  portmapper
>>>       100000    2   tcp    111  portmapper
>>>       100000    4   udp    111  portmapper
>>>       100000    3   udp    111  portmapper
>>>       100000    2   udp    111  portmapper
>>>       100024    1   udp  42104  status
>>>       100024    1   tcp  40159  status
>>>       100003    3   udp   2049  nfs
>>>       100227    3   udp   2049  nfs_acl
>>>       100003    3   tcp   2049  nfs
>>>       100003    4   tcp   2049  nfs
>>>       100227    3   tcp   2049  nfs_acl
>>>       100021    1   udp  46387  nlockmgr
>>>       100021    3   udp  46387  nlockmgr
>>>       100021    4   udp  46387  nlockmgr
>>>       100021    1   tcp  36565  nlockmgr
>>>       100021    3   tcp  36565  nlockmgr
>>>       100021    4   tcp  36565  nlockmgr
>>>
>>>
>>> Are you seeing different results?
>> Yup
>> uname -r
>> 6.11.0-0.rc0.20240724git786c8248dbd3.12.fc41.x86_64 (rawhide)
>>
> 
> Did you patch that kernel by hand then? AFAICT, that git hash doesn't
> have the necessary fix. I don't think Chuck has sent a PR to Linus for
> it just yet.
No I did not... Due to the fact I can not commit theses
patches until the kernel patch land into the distros.

steved.
Chuck Lever July 27, 2024, 4:03 p.m. UTC | #6
> On Jul 26, 2024, at 6:20 PM, Jeff Layton <jlayton@kernel.org> wrote:
> 
> On Fri, 2024-07-26 at 17:59 -0400, Steve Dickson wrote:
>> 
>> On 7/26/24 5:32 PM, Jeff Layton wrote:
>>> On Fri, 2024-07-26 at 15:40 -0400, Steve Dickson wrote:
>>>> Hey!
>>>> 
>>>> On 7/22/24 1:01 PM, Jeff Layton wrote:
>>>>> Hi Steve,
>>>>> 
>>>>> Here's an squashed version of the nfsdctl patches, that represents
>>>>> the latest changes. Let me know if you run into any other problems,
>>>>> and thanks for helping to test this!
>>>>> 
>>>>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>>>>> ---
>>>>> Changes in v6:
>>>>> - make the default number of threads 16 in autostart
>>>>> - doc updates
>>>>> 
>>>>> Changes in v5:
>>>>> - add support for pool-mode setting
>>>>> - fix up the handling of nfsd_netlink.h in autoconf
>>>>> - Link to v4:
>>>>> https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
>>>>> 
>>>>> Changes in v4:
>>>>> - add ability to specify an array of pool thread counts in nfs.conf
>>>>> - Link to v3:
>>>>> https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
>>>>> 
>>>>> Changes in v3:
>>>>> - split nfsdctl.h so we can include the UAPI header as-is
>>>>> - squash the patches together that added Lorenzo's version and
>>>>> convert
>>>>>    it to the new interface
>>>>> - adapt to latest version of netlink interface changes
>>>>>    + have THREADS_SET/GET report an array of thread counts (one per
>>>>> pool)
>>>>>    + pass scope in as a string to THREADS_SET instead of using
>>>>> unshare() trick
>>>>> 
>>>>> Changes in v2:
>>>>> - Adapt to latest kernel netlink interface changes (in particular,
>>>>> send
>>>>>    the leastime and gracetime when they are set in the config).
>>>>> - More help text for different subcommands
>>>>> - New nfsdctl(8) manpage
>>>>> - Patch to make systemd preferentially use nfsdctl instead of
>>>>> rpc.nfsd
>>>>> - Link to v1:
>>>>> https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
>>>>> 
>>>>> ---
>>>>> Jeff Layton (3):
>>>>>        nfsdctl: add the nfsdctl utility to nfs-utils
>>>>>        nfsdctl: asciidoc source for the manpage
>>>>>        systemd: use nfsdctl to start and stop the nfs server
>>>>> 
>>>>>   configure.ac                 |   19 +
>>>>>   systemd/nfs-server.service   |    4 +-
>>>>>   utils/Makefile.am            |    4 +
>>>>>   utils/nfsdctl/Makefile.am    |   13 +
>>>>>   utils/nfsdctl/nfsd_netlink.h |   96 +++
>>>>>   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>>>>>   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>>>>>   utils/nfsdctl/nfsdctl.c      | 1570
>>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>>   utils/nfsdctl/nfsdctl.h      |   93 +++
>>>>>   9 files changed, 2259 insertions(+), 2 deletions(-)
>>>>> ---
>>>>> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
>>>>> change-id: 20240412-nfsdctl-fa8bd8430cfd
>>>> 
>>>> The patches apply very cleaning and thank you
>>>> for squashing them down... but... bring up the
>>>> NFS server with 'nfsdctl autostart' v3 is not
>>>> being registered with rpcbind which means
>>>> v3 mount will not work.
>>>> 
>>>> Just curious are you trying support my
>>>> idea of deprecating V3 :-) (That's a joke!)
>>>> 
>>>> steved.
>>>> 
>>> 
>>> You do need a patched kernel for this:
>>> 
>>>     https://lore.kernel.org/linux-nfs/Zp5j2DW+2BNaIPif@tissot.1015granger.net/T/#e675642639c59b1c0070f4b19cd03b89cff7983ba
>>> 
>>> With a patched kernel, I get this with autostart:
>>> 
>>> [kdevops@kdevops-nfsd ~]$ rpcinfo -p
>>>    program vers proto   port  service
>>>     100000    4   tcp    111  portmapper
>>>     100000    3   tcp    111  portmapper
>>>     100000    2   tcp    111  portmapper
>>>     100000    4   udp    111  portmapper
>>>     100000    3   udp    111  portmapper
>>>     100000    2   udp    111  portmapper
>>>     100024    1   udp  42104  status
>>>     100024    1   tcp  40159  status
>>>     100003    3   udp   2049  nfs
>>>     100227    3   udp   2049  nfs_acl
>>>     100003    3   tcp   2049  nfs
>>>     100003    4   tcp   2049  nfs
>>>     100227    3   tcp   2049  nfs_acl
>>>     100021    1   udp  46387  nlockmgr
>>>     100021    3   udp  46387  nlockmgr
>>>     100021    4   udp  46387  nlockmgr
>>>     100021    1   tcp  36565  nlockmgr
>>>     100021    3   tcp  36565  nlockmgr
>>>     100021    4   tcp  36565  nlockmgr
>>> 
>>> 
>>> Are you seeing different results?
>> Yup
>> uname -r
>> 6.11.0-0.rc0.20240724git786c8248dbd3.12.fc41.x86_64 (rawhide)
> 
> Did you patch that kernel by hand then? AFAICT, that git hash doesn't
> have the necessary fix. I don't think Chuck has sent a PR to Linus for
> it just yet.

"nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets"
is queued up for v6.11-rc.


--
Chuck Lever
Jeff Layton Sept. 30, 2024, 3:52 p.m. UTC | #7
On Mon, 2024-07-22 at 13:01 -0400, Jeff Layton wrote:
> Hi Steve,
> 
> Here's an squashed version of the nfsdctl patches, that represents
> the latest changes. Let me know if you run into any other problems,
> and thanks for helping to test this!
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v6:
> - make the default number of threads 16 in autostart
> - doc updates
> 
> Changes in v5:
> - add support for pool-mode setting
> - fix up the handling of nfsd_netlink.h in autoconf
> - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> 
> Changes in v4:
> - add ability to specify an array of pool thread counts in nfs.conf
> - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> 
> Changes in v3:
> - split nfsdctl.h so we can include the UAPI header as-is
> - squash the patches together that added Lorenzo's version and convert
>   it to the new interface
> - adapt to latest version of netlink interface changes
>   + have THREADS_SET/GET report an array of thread counts (one per pool)
>   + pass scope in as a string to THREADS_SET instead of using unshare() trick
> 
> Changes in v2:
> - Adapt to latest kernel netlink interface changes (in particular, send
>   the leastime and gracetime when they are set in the config).
> - More help text for different subcommands
> - New nfsdctl(8) manpage
> - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
> - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> 
> ---
> Jeff Layton (3):
>       nfsdctl: add the nfsdctl utility to nfs-utils
>       nfsdctl: asciidoc source for the manpage
>       systemd: use nfsdctl to start and stop the nfs server
> 
>  configure.ac                 |   19 +
>  systemd/nfs-server.service   |    4 +-
>  utils/Makefile.am            |    4 +
>  utils/nfsdctl/Makefile.am    |   13 +
>  utils/nfsdctl/nfsd_netlink.h |   96 +++
>  utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>  utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>  utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
>  utils/nfsdctl/nfsdctl.h      |   93 +++
>  9 files changed, 2259 insertions(+), 2 deletions(-)
> ---
> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> change-id: 20240412-nfsdctl-fa8bd8430cfd
> 
> Best regards,

Ping?
Steve Dickson Sept. 30, 2024, 4:16 p.m. UTC | #8
On 9/30/24 11:52 AM, Jeff Layton wrote:
> On Mon, 2024-07-22 at 13:01 -0400, Jeff Layton wrote:
>> Hi Steve,
>>
>> Here's an squashed version of the nfsdctl patches, that represents
>> the latest changes. Let me know if you run into any other problems,
>> and thanks for helping to test this!
>>
>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>> ---
>> Changes in v6:
>> - make the default number of threads 16 in autostart
>> - doc updates
>>
>> Changes in v5:
>> - add support for pool-mode setting
>> - fix up the handling of nfsd_netlink.h in autoconf
>> - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
>>
>> Changes in v4:
>> - add ability to specify an array of pool thread counts in nfs.conf
>> - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
>>
>> Changes in v3:
>> - split nfsdctl.h so we can include the UAPI header as-is
>> - squash the patches together that added Lorenzo's version and convert
>>    it to the new interface
>> - adapt to latest version of netlink interface changes
>>    + have THREADS_SET/GET report an array of thread counts (one per pool)
>>    + pass scope in as a string to THREADS_SET instead of using unshare() trick
>>
>> Changes in v2:
>> - Adapt to latest kernel netlink interface changes (in particular, send
>>    the leastime and gracetime when they are set in the config).
>> - More help text for different subcommands
>> - New nfsdctl(8) manpage
>> - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
>> - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
>>
>> ---
>> Jeff Layton (3):
>>        nfsdctl: add the nfsdctl utility to nfs-utils
>>        nfsdctl: asciidoc source for the manpage
>>        systemd: use nfsdctl to start and stop the nfs server
>>
>>   configure.ac                 |   19 +
>>   systemd/nfs-server.service   |    4 +-
>>   utils/Makefile.am            |    4 +
>>   utils/nfsdctl/Makefile.am    |   13 +
>>   utils/nfsdctl/nfsd_netlink.h |   96 +++
>>   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>>   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>>   utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
>>   utils/nfsdctl/nfsdctl.h      |   93 +++
>>   9 files changed, 2259 insertions(+), 2 deletions(-)
>> ---
>> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
>> change-id: 20240412-nfsdctl-fa8bd8430cfd
>>
>> Best regards,
> 
> Ping?
I'm keeping my eye on it.... I have the bits on
a private branch... I just don't want to break
v3... when the distros get to 6.11... I'll
make it happen

steved.
Jeff Layton Oct. 16, 2024, 3:02 p.m. UTC | #9
On Mon, 2024-09-30 at 12:16 -0400, Steve Dickson wrote:
> 
> On 9/30/24 11:52 AM, Jeff Layton wrote:
> > On Mon, 2024-07-22 at 13:01 -0400, Jeff Layton wrote:
> > > Hi Steve,
> > > 
> > > Here's an squashed version of the nfsdctl patches, that represents
> > > the latest changes. Let me know if you run into any other problems,
> > > and thanks for helping to test this!
> > > 
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > ---
> > > Changes in v6:
> > > - make the default number of threads 16 in autostart
> > > - doc updates
> > > 
> > > Changes in v5:
> > > - add support for pool-mode setting
> > > - fix up the handling of nfsd_netlink.h in autoconf
> > > - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> > > 
> > > Changes in v4:
> > > - add ability to specify an array of pool thread counts in nfs.conf
> > > - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> > > 
> > > Changes in v3:
> > > - split nfsdctl.h so we can include the UAPI header as-is
> > > - squash the patches together that added Lorenzo's version and convert
> > >    it to the new interface
> > > - adapt to latest version of netlink interface changes
> > >    + have THREADS_SET/GET report an array of thread counts (one per pool)
> > >    + pass scope in as a string to THREADS_SET instead of using unshare() trick
> > > 
> > > Changes in v2:
> > > - Adapt to latest kernel netlink interface changes (in particular, send
> > >    the leastime and gracetime when they are set in the config).
> > > - More help text for different subcommands
> > > - New nfsdctl(8) manpage
> > > - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
> > > - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> > > 
> > > ---
> > > Jeff Layton (3):
> > >        nfsdctl: add the nfsdctl utility to nfs-utils
> > >        nfsdctl: asciidoc source for the manpage
> > >        systemd: use nfsdctl to start and stop the nfs server
> > > 
> > >   configure.ac                 |   19 +
> > >   systemd/nfs-server.service   |    4 +-
> > >   utils/Makefile.am            |    4 +
> > >   utils/nfsdctl/Makefile.am    |   13 +
> > >   utils/nfsdctl/nfsd_netlink.h |   96 +++
> > >   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
> > >   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
> > >   utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
> > >   utils/nfsdctl/nfsdctl.h      |   93 +++
> > >   9 files changed, 2259 insertions(+), 2 deletions(-)
> > > ---
> > > base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> > > change-id: 20240412-nfsdctl-fa8bd8430cfd
> > > 
> > > Best regards,
> > 
> > Ping?
> I'm keeping my eye on it.... I have the bits on
> a private branch... I just don't want to break
> v3... when the distros get to 6.11... I'll
> make it happen
> 

Previously, you said you would merge it once rawhide had a sufficient
kernel, which it has had for months. Fedora 40 is now shipping a v6.11
kernel. Can we get this in now?

Thanks,
Steve Dickson Oct. 16, 2024, 8:10 p.m. UTC | #10
On 10/16/24 11:02 AM, Jeff Layton wrote:
> On Mon, 2024-09-30 at 12:16 -0400, Steve Dickson wrote:
>>
>> On 9/30/24 11:52 AM, Jeff Layton wrote:
>>> On Mon, 2024-07-22 at 13:01 -0400, Jeff Layton wrote:
>>>> Hi Steve,
>>>>
>>>> Here's an squashed version of the nfsdctl patches, that represents
>>>> the latest changes. Let me know if you run into any other problems,
>>>> and thanks for helping to test this!
>>>>
>>>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>>>> ---
>>>> Changes in v6:
>>>> - make the default number of threads 16 in autostart
>>>> - doc updates
>>>>
>>>> Changes in v5:
>>>> - add support for pool-mode setting
>>>> - fix up the handling of nfsd_netlink.h in autoconf
>>>> - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
>>>>
>>>> Changes in v4:
>>>> - add ability to specify an array of pool thread counts in nfs.conf
>>>> - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
>>>>
>>>> Changes in v3:
>>>> - split nfsdctl.h so we can include the UAPI header as-is
>>>> - squash the patches together that added Lorenzo's version and convert
>>>>     it to the new interface
>>>> - adapt to latest version of netlink interface changes
>>>>     + have THREADS_SET/GET report an array of thread counts (one per pool)
>>>>     + pass scope in as a string to THREADS_SET instead of using unshare() trick
>>>>
>>>> Changes in v2:
>>>> - Adapt to latest kernel netlink interface changes (in particular, send
>>>>     the leastime and gracetime when they are set in the config).
>>>> - More help text for different subcommands
>>>> - New nfsdctl(8) manpage
>>>> - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
>>>> - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
>>>>
>>>> ---
>>>> Jeff Layton (3):
>>>>         nfsdctl: add the nfsdctl utility to nfs-utils
>>>>         nfsdctl: asciidoc source for the manpage
>>>>         systemd: use nfsdctl to start and stop the nfs server
>>>>
>>>>    configure.ac                 |   19 +
>>>>    systemd/nfs-server.service   |    4 +-
>>>>    utils/Makefile.am            |    4 +
>>>>    utils/nfsdctl/Makefile.am    |   13 +
>>>>    utils/nfsdctl/nfsd_netlink.h |   96 +++
>>>>    utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>>>>    utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>>>>    utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
>>>>    utils/nfsdctl/nfsdctl.h      |   93 +++
>>>>    9 files changed, 2259 insertions(+), 2 deletions(-)
>>>> ---
>>>> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
>>>> change-id: 20240412-nfsdctl-fa8bd8430cfd
>>>>
>>>> Best regards,
>>>
>>> Ping?
>> I'm keeping my eye on it.... I have the bits on
>> a private branch... I just don't want to break
>> v3... when the distros get to 6.11... I'll
>> make it happen
>>
> 
> Previously, you said you would merge it once rawhide had a sufficient
> kernel, which it has had for months. Fedora 40 is now shipping a v6.11
> kernel. Can we get this in now?
Very true... I did notice just f40 got to v6.11... so
now I can make the release... just in time for Bakeathon.

I just hoping the release will not break V3 (which it will)
on other distros that are not at v6.11.

steved.
Steve Dickson Oct. 17, 2024, 11:40 a.m. UTC | #11
On 7/22/24 1:01 PM, Jeff Layton wrote:
> Hi Steve,
> 
> Here's an squashed version of the nfsdctl patches, that represents
> the latest changes. Let me know if you run into any other problems,
> and thanks for helping to test this!
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v6:
> - make the default number of threads 16 in autostart
> - doc updates
> 
> Changes in v5:
> - add support for pool-mode setting
> - fix up the handling of nfsd_netlink.h in autoconf
> - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> 
> Changes in v4:
> - add ability to specify an array of pool thread counts in nfs.conf
> - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> 
> Changes in v3:
> - split nfsdctl.h so we can include the UAPI header as-is
> - squash the patches together that added Lorenzo's version and convert
>    it to the new interface
> - adapt to latest version of netlink interface changes
>    + have THREADS_SET/GET report an array of thread counts (one per pool)
>    + pass scope in as a string to THREADS_SET instead of using unshare() trick
> 
> Changes in v2:
> - Adapt to latest kernel netlink interface changes (in particular, send
>    the leastime and gracetime when they are set in the config).
> - More help text for different subcommands
> - New nfsdctl(8) manpage
> - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
> - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> 
> ---
> Jeff Layton (3):
>        nfsdctl: add the nfsdctl utility to nfs-utils
>        nfsdctl: asciidoc source for the manpage
>        systemd: use nfsdctl to start and stop the nfs server
> 
>   configure.ac                 |   19 +
>   systemd/nfs-server.service   |    4 +-
>   utils/Makefile.am            |    4 +
>   utils/nfsdctl/Makefile.am    |   13 +
>   utils/nfsdctl/nfsd_netlink.h |   96 +++
>   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
>   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
>   utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
>   utils/nfsdctl/nfsdctl.h      |   93 +++
>   9 files changed, 2259 insertions(+), 2 deletions(-)
> ---
> base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> change-id: 20240412-nfsdctl-fa8bd8430cfd
> 
> Best regards,
Committed... (tag: nfs-utils-2-7-2-rc2)

Note: These changes need a v6.11 kernel for V3 to
come up properly

steved.
Jeff Layton Oct. 17, 2024, 3:22 p.m. UTC | #12
On Thu, 2024-10-17 at 07:40 -0400, Steve Dickson wrote:
> 
> On 7/22/24 1:01 PM, Jeff Layton wrote:
> > Hi Steve,
> > 
> > Here's an squashed version of the nfsdctl patches, that represents
> > the latest changes. Let me know if you run into any other problems,
> > and thanks for helping to test this!
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> > Changes in v6:
> > - make the default number of threads 16 in autostart
> > - doc updates
> > 
> > Changes in v5:
> > - add support for pool-mode setting
> > - fix up the handling of nfsd_netlink.h in autoconf
> > - Link to v4: https://lore.kernel.org/r/20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org
> > 
> > Changes in v4:
> > - add ability to specify an array of pool thread counts in nfs.conf
> > - Link to v3: https://lore.kernel.org/r/20240423-nfsdctl-v3-0-9e68181c846d@kernel.org
> > 
> > Changes in v3:
> > - split nfsdctl.h so we can include the UAPI header as-is
> > - squash the patches together that added Lorenzo's version and convert
> >    it to the new interface
> > - adapt to latest version of netlink interface changes
> >    + have THREADS_SET/GET report an array of thread counts (one per pool)
> >    + pass scope in as a string to THREADS_SET instead of using unshare() trick
> > 
> > Changes in v2:
> > - Adapt to latest kernel netlink interface changes (in particular, send
> >    the leastime and gracetime when they are set in the config).
> > - More help text for different subcommands
> > - New nfsdctl(8) manpage
> > - Patch to make systemd preferentially use nfsdctl instead of rpc.nfsd
> > - Link to v1: https://lore.kernel.org/r/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org
> > 
> > ---
> > Jeff Layton (3):
> >        nfsdctl: add the nfsdctl utility to nfs-utils
> >        nfsdctl: asciidoc source for the manpage
> >        systemd: use nfsdctl to start and stop the nfs server
> > 
> >   configure.ac                 |   19 +
> >   systemd/nfs-server.service   |    4 +-
> >   utils/Makefile.am            |    4 +
> >   utils/nfsdctl/Makefile.am    |   13 +
> >   utils/nfsdctl/nfsd_netlink.h |   96 +++
> >   utils/nfsdctl/nfsdctl.8      |  304 ++++++++
> >   utils/nfsdctl/nfsdctl.adoc   |  158 +++++
> >   utils/nfsdctl/nfsdctl.c      | 1570 ++++++++++++++++++++++++++++++++++++++++++
> >   utils/nfsdctl/nfsdctl.h      |   93 +++
> >   9 files changed, 2259 insertions(+), 2 deletions(-)
> > ---
> > base-commit: b76dbaa48f7c239accb0c2d1e1d51ddd73f4d6be
> > change-id: 20240412-nfsdctl-fa8bd8430cfd
> > 
> > Best regards,
> Committed... (tag: nfs-utils-2-7-2-rc2)
> 
> Note: These changes need a v6.11 kernel for V3 to
> come up properly
> 

Thanks! To be clear:

The "v3 problem" you're referring to was fixed in mainline by:

    91da337e5d50 nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets

That patch also went into v6.10.5 (as 04c2c4d836ff) as well. Earlier
kernels don't need it since they lack the relevant netlink interfaces
altogether.