]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commit
nfs: Update to version number 2.8.2
authorAdolf Belka <adolf.belka@ipfire.org>
Sun, 19 Jan 2025 22:08:41 +0000 (23:08 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Feb 2025 13:07:27 +0000 (13:07 +0000)
commit1afe952c39698e1d5dfa395a491da951667846e8
tree5b4460ad4edff4d085c5f554c1c2a66d347b63e6
parentc1cf0b3172cfd6b880cc387225b0a98a160374f4
nfs: Update to version number 2.8.2

- Update from versionj number 2.7.1 to 2.8.2
- Update of rootfile
- Changelog
    2.8.2
exports: Fix referrals when --enable-junction=no
    Commit 15dc0bea ("exportd: Moved cache upcalls routines into
    libexport.a") caused write_fsloc() to be elided when junction support is
    disabled. Remove the not needed #ifdef HAVE_JUNCTION_SUPPORT which
    blocks the referrals from working when --enable-junction=no is set.
    (only the #ifdef HAVE_JUNCTION_SUPPORT should be around actual
    junction code).
Fixes: 15dc0bea ("exportd: Moved cache upcalls routines into libexport.a")
Link: https://bugs.debian.org/1035908
Link: https://bugs.debian.org/1083098
nfsidmap(v2): Add guards around [nfsidmap] usages of [sysconf].
    sysconf(_SC_GETPW_R_SIZE_MAX) and sysconf(_SC_GETGR_R_SIZE_MAX)
    return -1 on musl, which causes either segmentation faults or ENOMEM
    errors.
    Replace all usages of sysconf with dedicated methods that guard against
    a result of -1.
libnsm(v2): fix the safer atomic filenames fix
    Commit 9f7a91b51ffc ("libnsm: safer atomic filenames") messed up the length
    arguement to snprintf() in nsm_make_temp_pathname such that the length is
    longer than the computed string.  When compiled with "-O
    -D_FORTIFY_SOURCE=3", __snprintf_chk will fail and abort statd.
    The fix is to correct the original size calculation, then pull one from the
    snprintf length for the final "/".
Revert "libnsm: fix the safer atomic filenames fix"
    This reverts commit 8fcddae4437510137baf108f477d116ce345ce80.
libnsm: fix the safer atomic filenames fix
    Commit 9f7a91b51ffc ("libnsm: safer atomic filenames") messed up the length
    arguement to snprintf() in nsm_make_temp_pathname such that the length is
    longer than the computed string.  When compiled with "-O
    -D_FORTIFY_SOURCE=3", __snprintf_chk will fail and abort statd.
    The fix is to correct the original size calculation, then pull one from the
    snprintf length for the final "/".
nfsd: dump default number of threads to 16
    nfsdctl defaults to 16 threads.  Since the nfs-server.service file first
    tries nfsdctl and then falls back to rpc.nfsd, it would probably be wise
    to make the default in rpc.nfsd and nfs.conf 16, for the sake of
    consistency and to avoid surprises.
autoconf: don't build nfsdcltrack by default
    Now that we've started the process to remove legacy v4 client tracking
    methods, let's stop building nfsdcltrack by default.
nfs(5): Update rsize/wsize options
    The rsize/wsize values are not multiples of 1024 but multiples of the
    system's page size or powers of 2 if < system's page size as defined
    in fs/nfs/internal.h:nfs_io_size().
nfsdctl: clarify when versions can be set on the man page
    Attempting to make version changes while there are nfsd threads running
    fails with -EBUSY, so make note of it on the man page.
nfsdctl: fix up the help text in version_usage()
    The help text in version_usage() has examples with a 'v' character in
    the version string, but the format string in the sscanf() call in
    version_func() doesn't contain a 'v' character.
libnsm: safer atomic filenames
    We've gotten a report of reboot notifications being sent to domains that
    end in '.new', which can happen if the NSM temporary pathname code leaves a
    file behind.  Let's fix this up by prepending a single '.' to the temp path
    which will never be resolvable as a DNS record.
    https://lore.kernel.org/linux-nfs/04D30B5A-C53E-4920-ADCB-C77F5577669E@oracle.com/T/#t
nfs-utils: fixup statd testing simulator host arg
    The getopt setup for the host arg was not expecing a value, update it as
    expected
reexport.h: Include unistd.h to compile with musl
Makefile.am: allow mount.nfs to be writeable by owner
    On Red Hat-based systems, the debug symbol files are built with a
    .gdb_index section to speed up gdb initialization.  The gdb-add-index
    program calls objcopy to merge the index file into the object file.
    That fails if the object file isn't writeable by the owner.
mount.nfs: retry NFSv3 mount after NFSv4 failure in auto negotiation
    The problem happens when a v3 mount fails with ETIMEDOUT after
    the v4 mount failed with EPROTONOSUPPORT, in mount auto negotiation.
    It immediately breaks from the "for" loop in nfsmount_fg()
    or nfsmount_child() due to EPROTONOSUPPORT, never doing the expected
    retries until timeout.
    2.8.1
nfs-utils: use getpwuid_r() and getpwnam_r() in gssd
    gssd uses getpwuid(3) and getpwnam(3) in a pthreads context but
    these functions are not thread safe.
nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot
    I saw a VMWare guest that hit a rare condition during boot;
    nfsdcld started too early to check access on /var/lib/nfs/nfsdcld which were
    still in read-only file system as follows:
      nfsdcld[...]: Unexpected error when checking access on /var/lib/nfs/nfsdcld: Read-only file system
      systemd[1]: nfsdcld.service: Main process exited, code=exited, status=226/NAMESPACE
      systemd[1]: nfsdcld.service: Failed with result 'exit-code'.
    nfsdcld.service needs to wait the root file system to be remounted at least.
systemd: use nfsdctl to start and stop the nfs server
    Attempt to use nfsdctl to start and stop the nfs-server. If that fails
    for any reason, use rpc.nfsd to do it instead.
nfsdctl: asciidoc source for the manpage
    Convert to manpage with:
        asciidoctor -b manpage nfsdctl.adoc
nfsdctl: add the nfsdctl utility to nfs-utils
    This tool is based on Lorenzo's original nfsdctl tool [1]. His original
    tool used getopt_long to indicate the command, but that's somewhat
    limiting. This converts it to a subcommand-based interface, where each
    subcommand can take its own options, in the spirit of commands like
    nmcli or virsh.
    There are currently 6 different subcommands:
        pool-mode            get/set current pool mode setting
        listener             get/set listener info
        version              get/set supported NFS versions
        threads              get/set nfsd thread settings
        status               get current RPC processing info
        autostart            start server with settings from /etc/nfs.conf
    Each can take different options, and we can expand this interface later
    with more commands as necessary.
    This is based on Lorenzo's original userland tool:
        https://github.com/LorenzoBianconi/nfsdctl
rpc.idmapd: nfsopen() failures should not be fatal
    dirscancb() loops over all clnt* subdirectories of /run/rpc_pipefs/nfs/.
    Some of these directories contain /idmap files, others don't. nfsopen()
    returns -1 for the latter; we then want to skip the directory, not abort
    the entire scan.
mount.nfs: improve EPROTO error message for RDMA mounts
    When mounting NFS shares using RDMA, users may encounter this rather
    unclear error message:
        mount.nfs: Protocol error
    Often there are either no RDMA interfaces existing, or that routing is
    being done via other interfaces. This patch enhances the `mount_error`
    function to provide a more informative message in such cases.
support/junction/path.c: Fix buld for musl
    Fixed:
    path.c:164:24: error: implicit declaration of function 'strchrnul'; did you mean 'strchr'? [-Wimplicit-function-declaration]
    [snip]
    path.c:239:27: error: 'NAME_MAX' undeclared (first use in this function); did you mean 'AF_MAX'?
support/include/junction.h: Define macros for musl
    Fixed 1:
    In file included from cache.c:1217:
    ../../support/include/junction.h:128:21: error: expected ';' before 'char'
      128 | __attribute_malloc__
          |                     ^
          |                     ;
      129 | char            **nfs_dup_string_array(char **array);
    Fixed 2:
    junction.c: In function 'junction_set_sticky_bit':
    junction.c:164:39: error: 'ALLPERMS' undeclared (first use in this function)
      164 |         stb.st_mode &= (unsigned int)~ALLPERMS;
nfsdcld: don't send null client ids to the kernel
    It's apparently possible for the sqlite database to get corrupted and
    cause one or more rows to have null in the id column.
    The knfsd fix was posted here:
    https://lore.kernel.org/linux-nfs/20240903111446.659884-1-lilingfeng3@huawei.com/
    nfsdcld should have a similar fix.  If we encounter a client record with
    a null id, just skip it instead of sending it to the kernel.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/packages/nfs
lfs/nfs