From patchwork Fri Jul 28 16:07:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Hasenack X-Patchwork-Id: 13332102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FC80C0015E for ; Fri, 28 Jul 2023 16:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbjG1QHa (ORCPT ); Fri, 28 Jul 2023 12:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234254AbjG1QH3 (ORCPT ); Fri, 28 Jul 2023 12:07:29 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B54A3C33 for ; Fri, 28 Jul 2023 09:07:28 -0700 (PDT) Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id F21E23F189 for ; Fri, 28 Jul 2023 16:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1690560446; bh=VWsZj46S7NjxWXV41GGxSIF0YgoDBQk8g0COLW27ZQo=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=pdY72ETqfZ7JYnKixZ5ussrueANh7sSQP4TiDe6I+Y9PzNaahTru6sZDl7D5uaJmq u6Izqwpw2KfR4nnIoli5tDqKDz1+6GYFdk2+EKD0jrSQUxbGl+gsirEC/CtL6D4nPZ PGog2fe9mIoxACLT/giwSs7z998pjR7kNwNiHs10GmeTQ068KH48rZyJPSuJBXE+M2 wT3lp2cf8u7gp/fYBPMYs4pQJ7la4PwZStdc2NGv7/GIoJ1WM0pJwyJ83U0ITGtqk0 PQ2Vfm5aCWTe5x3D9OPUahdp5iXctoMdSzp2DCnJNTXBfTu/0FNYM/3YpTS3j6Ba0s Vw22CS2nMw4kQ== Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-56942442eb0so25184547b3.1 for ; Fri, 28 Jul 2023 09:07:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690560446; x=1691165246; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VWsZj46S7NjxWXV41GGxSIF0YgoDBQk8g0COLW27ZQo=; b=X2wmMnihfIs2FHwePOSylwo7ohVzulN1ViBHq8Drs5Lxp7L6slCcIE0UVIq2BZ5LQz VLDYb+V2UisGlX7pV7BKQLjVg3xOsOG1gZPazW3pO0vKoYnGghaPGDqtj0FO5V8B9ZvZ MigUzPN9UUDzf7J47rmp60DRRl6KPcAZygxh4qJxxlHbjmfSAKc6pfKEeAZpqAETaKsm WbPbAQ60EDSLhaDv1uPlxtb6IdvTerrUpY87IBx4zCSoO7o+ZyUzL6ON+iz1opdOGSPz IG7cO+u/F5lVtiAEnrS1hay0PHQRw/RYNEoXt/ysTf9EsDLOSrsK8P/74hXP9wd0StcA eJBA== X-Gm-Message-State: ABy/qLbGUqHlhaMy3H+WKvoXtp9w78LBmh9ytaiUe5YBiAtmkJwSXI6Z sq8Vt5su0sFCIBYQZwijVPGorOJ8Fq2VwHHNPCagC0JNrpZOCaL8AOUHScB1uJddRu2z8UroAUc gymvP1dMmxDqBC0IhB2cDrkzys9A17tXGdAperHEveom3X6JGEY49zWpnwk9EXfu0 X-Received: by 2002:a0d:ccd0:0:b0:579:e327:8229 with SMTP id o199-20020a0dccd0000000b00579e3278229mr2025626ywd.34.1690560445873; Fri, 28 Jul 2023 09:07:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGIcTPbJ0h3i0ZDsy2j5KtUFu1DMFHGh9mhFYqPvPTi70yABrr5vYIIUzT14J2aE9LD/PgdOQkyxGeUmbZgz/I= X-Received: by 2002:a0d:ccd0:0:b0:579:e327:8229 with SMTP id o199-20020a0dccd0000000b00579e3278229mr2025617ywd.34.1690560445631; Fri, 28 Jul 2023 09:07:25 -0700 (PDT) MIME-Version: 1.0 From: Andreas Hasenack Date: Fri, 28 Jul 2023 13:07:14 -0300 Message-ID: Subject: [PATCH 1/2] Always run the rpc_pipefs generator To: linux-nfs@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Shipping both a static unit and a generator to mount rpc_pipefs increases complexity and can introduce bugs, like seen in [1]. Since there is a generator, let's use it all the time, even when the rpc_pipefs mountpoint matches the compiled in default. 1. https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1971935/comments/22 Signed-off-by: Andreas Hasenack --- systemd/rpc-pipefs-generator.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/systemd/rpc-pipefs-generator.c b/systemd/rpc-pipefs-generator.c index 3aaeaeaf..ff6ac988 100644 --- a/systemd/rpc-pipefs-generator.c +++ b/systemd/rpc-pipefs-generator.c @@ -140,9 +140,6 @@ int main(int argc, char *argv[]) s = conf_get_str("general", "pipefs-directory"); if (!s) exit(0); - if (strlen(s) == strlen(RPC_PIPEFS_DEFAULT) && - strcmp(s, RPC_PIPEFS_DEFAULT) == 0) - exit(0); if (is_non_pipefs_mountpoint(s)) exit(1); From patchwork Fri Jul 28 16:08:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Hasenack X-Patchwork-Id: 13332103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DC87C001DE for ; Fri, 28 Jul 2023 16:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229505AbjG1QIx (ORCPT ); Fri, 28 Jul 2023 12:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbjG1QIv (ORCPT ); Fri, 28 Jul 2023 12:08:51 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 582D8421C for ; Fri, 28 Jul 2023 09:08:47 -0700 (PDT) Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4FE8C3F078 for ; Fri, 28 Jul 2023 16:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1690560524; bh=IGgPL8KuCqmQ13+6Q23Tuc7dCOw/HvMHB25ZF+jfSg8=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=MbM9lYg7lkBkBDLB/IFnHvLAav6wk/BJ5CfYVQKrz9hPgquapa+7p+bS3NEuD+HNF UWwpPtOmx1AtWhD8SH1mGxgdWK9xohmQwcPT1U5OhlnGprpE7G3GI1gs1lTWyFpcFk NLkNiZplbHD51plRO94ywYx20bFOGSXHx0GQJJJ+s/Tq9SWz+HfY5RpSxNeIHmrGS6 xjQteNalK6z5LUMGlzw/hrWGJIxTx+Nzyvf/VW5D6402yt+HF5Y1AhkEaard/BZlev SI8LCJ7z212mLxnKZPaq+wEd/f/VZgLyhKBZC/WRzlQ9Q++CpGEVJppizDXmI75Zts myTxMhMVDWHAA== Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5704970148dso23612597b3.3 for ; Fri, 28 Jul 2023 09:08:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690560523; x=1691165323; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IGgPL8KuCqmQ13+6Q23Tuc7dCOw/HvMHB25ZF+jfSg8=; b=f8sebOs3pqCL0w8sackw0VrGgDIX2ulx3BYuKeivXQVd5Va+ieTQRWuZPEWR4vG813 xHj8AiOhNiRq8ik8Mcgao6LBMXTun/Ysgf1edR2KIsG6DZ4Nz/SJcI8086zzD3O/9Z/P 7uRNhBxxcC4wbxZhS+3hI3Ff/jBnI4vhPQnCrCwHIMMstl4tn8uO0HqimgIeY2seH+oJ 4iLwKluVSewx3CxnGj6+BJtUbENRG2IYXLYXOAJEs9Aeo20K7yNL7bXJea8qkStGTQfd 3CDheINBzi/FvCkdMeJci8Scru94Q5BBISU/UEsehgL2ee0luhvkpFzSmS7LrQUImWmK jDGg== X-Gm-Message-State: ABy/qLZxXrydPB3Vgjm0QpBorLNLnfQdF9/6Wj40q9YX8XtmuwDnjqNf Yd7+XNYNaxARSCNfPYUIY3eyc+i9DmkyEquEDXhW87j5IsKWxT+OHH4EDVgLxM2Pq/G1YPu8OQ5 0GjxLh0czzScMnOqL9Tnazd0npFcSwdPtDNNp/JKtSDFuLBmSzU7IHP8yUNPcLJn7 X-Received: by 2002:a81:fd0e:0:b0:583:cd37:432d with SMTP id g14-20020a81fd0e000000b00583cd37432dmr2403436ywn.49.1690560523417; Fri, 28 Jul 2023 09:08:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlGEIGfwOhejtno+Dfp0061XWnyI4A6ECRGTIS/3JGnnGtXfaM+ulwCoRS6x+C6WiVBPnvlVJffbEIKZ22r6KU4= X-Received: by 2002:a81:fd0e:0:b0:583:cd37:432d with SMTP id g14-20020a81fd0e000000b00583cd37432dmr2403417ywn.49.1690560523179; Fri, 28 Jul 2023 09:08:43 -0700 (PDT) MIME-Version: 1.0 From: Andreas Hasenack Date: Fri, 28 Jul 2023 13:08:32 -0300 Message-ID: Subject: [PATCH 2/2] Use the generated units instead of static ones To: linux-nfs@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Use the generated rpc_pipefs target and mount units instead of the static ones. The rpc-pipefs generator will take care of generating them. Signed-off-by: Andreas Hasenack --- configure.ac | 8 +------- systemd/Makefile.am | 5 ----- systemd/rpc_pipefs.target | 3 --- systemd/rpc_pipefs.target.in | 3 --- systemd/var-lib-nfs-rpc_pipefs.mount | 10 ---------- systemd/var-lib-nfs-rpc_pipefs.mount.in | 10 ---------- 6 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 systemd/rpc_pipefs.target delete mode 100644 systemd/rpc_pipefs.target.in delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount.in diff --git a/configure.ac b/configure.ac index 6fbcb974..13f3dc75 100644 --- a/configure.ac +++ b/configure.ac @@ -681,11 +681,7 @@ AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sysconfdir]) AC_SUBST([_statedir]) AC_CONFIG_COMMANDS_PRE([eval eval _statedir=$statedir]) -if test "$statedir" = "/var/lib/nfs"; then - rpc_pipefsmount="var-lib-nfs-rpc_pipefs.mount" -else - rpc_pipefsmount="$(systemd-escape -p "$statedir/rpc_pipefs").mount" -fi +rpc_pipefsmount="$(systemd-escape -p "$statedir/rpc_pipefs").mount" AC_SUBST(rpc_pipefsmount) # make _rpc_pipefsmount available for substitution in config files @@ -696,8 +692,6 @@ AC_CONFIG_COMMANDS_PRE([eval eval _rpc_pipefsmount=$rpc_pipefsmount]) AC_CONFIG_FILES([ Makefile systemd/rpc-gssd.service - systemd/rpc_pipefs.target - systemd/var-lib-nfs-rpc_pipefs.mount linux-nfs/Makefile support/Makefile support/export/Makefile diff --git a/systemd/Makefile.am b/systemd/Makefile.am index b4483222..1778f988 100644 --- a/systemd/Makefile.am +++ b/systemd/Makefile.am @@ -7,7 +7,6 @@ udev_files = 60-nfs.rules unit_files = \ nfs-client.target \ - rpc_pipefs.target \ \ nfs-mountd.service \ nfs-server.service \ @@ -18,9 +17,6 @@ unit_files = \ proc-fs-nfsd.mount \ fsidd.service -rpc_pipefs_mount_file = \ - var-lib-nfs-rpc_pipefs.mount - if CONFIG_NFSV4 unit_files += \ nfs-idmapd.service @@ -82,7 +78,6 @@ genexec_PROGRAMS = nfs-server-generator rpc-pipefs-generator install-data-hook: $(unit_files) $(udev_files) mkdir -p $(DESTDIR)/$(unitdir) cp $(unit_files) $(DESTDIR)/$(unitdir) - cp $(rpc_pipefs_mount_file) $(DESTDIR)/$(unitdir)/$(rpc_pipefsmount) mkdir -p $(DESTDIR)/$(udev_rulesdir) cp $(udev_files) $(DESTDIR)/$(udev_rulesdir) endif diff --git a/systemd/rpc_pipefs.target b/systemd/rpc_pipefs.target deleted file mode 100644 index 01d4d278..00000000 --- a/systemd/rpc_pipefs.target +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Requires=var-lib-nfs-rpc_pipefs.mount -After=var-lib-nfs-rpc_pipefs.mount diff --git a/systemd/rpc_pipefs.target.in b/systemd/rpc_pipefs.target.in deleted file mode 100644 index 332f62b6..00000000 --- a/systemd/rpc_pipefs.target.in +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Requires=@_rpc_pipefsmount@ -After=@_rpc_pipefsmount@ diff --git a/systemd/var-lib-nfs-rpc_pipefs.mount b/systemd/var-lib-nfs-rpc_pipefs.mount deleted file mode 100644 index 26d1c763..00000000 --- a/systemd/var-lib-nfs-rpc_pipefs.mount +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=RPC Pipe File System -DefaultDependencies=no -After=systemd-tmpfiles-setup.service -Conflicts=umount.target - -[Mount] -What=sunrpc -Where=/var/lib/nfs/rpc_pipefs -Type=rpc_pipefs diff --git a/systemd/var-lib-nfs-rpc_pipefs.mount.in b/systemd/var-lib-nfs-rpc_pipefs.mount.in deleted file mode 100644 index 4c5d6ce4..00000000 --- a/systemd/var-lib-nfs-rpc_pipefs.mount.in +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=RPC Pipe File System -DefaultDependencies=no -After=systemd-tmpfiles-setup.service -Conflicts=umount.target - -[Mount] -What=sunrpc -Where=@_statedir@/rpc_pipefs -Type=rpc_pipefs