From: Hackintosh 5 <hackintoshfive@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Hackintosh 5 <git@hack5.dev>
Subject: [PATCH v2] systemd: rpc-statd-notify.service can run in the background
Date: Mon, 4 Jan 2021 18:55:00 +0000 [thread overview]
Message-ID: <20210104185500.4018-1-git@hack5.dev> (raw)
In-Reply-To: <A5C09F1B-9309-40AC-99E6-BADA5CAD6CED@oracle.com>
This allows rpc-statd-notify to run in the background when it is
only in use by a client. This is done by a timer unit with a one
second timeout, which is Wanted by nfs-client.target. The result
is that there is no longer a dependency on network-online.target
by multi-user.target, so everyone gets faster boot times yay.
---
systemd/nfs-client.target | 2 +-
systemd/rpc-statd-notify.timer | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 systemd/rpc-statd-notify.timer
diff --git a/systemd/nfs-client.target b/systemd/nfs-client.target
index 8a8300a1..b7cce746 100644
--- a/systemd/nfs-client.target
+++ b/systemd/nfs-client.target
@@ -5,7 +5,7 @@ Wants=remote-fs-pre.target
# Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to
# start that on demand if needed.
-Wants=rpc-statd-notify.service
+Wants=rpc-statd-notify.timer
# GSS services dependencies and ordering
Wants=auth-rpcgss-module.service
diff --git a/systemd/rpc-statd-notify.timer b/systemd/rpc-statd-notify.timer
new file mode 100644
index 00000000..bac68817
--- /dev/null
+++ b/systemd/rpc-statd-notify.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Notify NFS peers of a restart
+RefuseManualStart=true
+RefuseManualStop=true
+
+[Timer]
+OnActiveSec=1
+Unit=rpc-statd-notify.service
+RemainAfterElapse=false
--
2.29.2
next prev parent reply other threads:[~2021-01-04 18:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 11:32 Boot time improvement with systemd and nfs-utils Hackintosh Five
2021-01-04 12:27 ` Chuck Lever
2021-01-04 12:51 ` Hackintosh Five
2021-01-04 12:54 ` Chuck Lever
[not found] ` <CAL5u83Fxd2rGuYuaghcC4irUtscmXr5-p36Qqf4+FwtctZJFaQ@mail.gmail.com>
[not found] ` <07383012-D499-498E-A194-716ABE1DE4C2@oracle.com>
2021-01-04 16:03 ` Hackintosh Five
2021-01-04 18:00 ` Chuck Lever
2021-01-04 18:53 ` Hackintosh Five
2021-01-04 18:55 ` Hackintosh 5 [this message]
2021-01-05 14:48 ` [PATCH v2] systemd: rpc-statd-notify.service can run in the background Tom Talpey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210104185500.4018-1-git@hack5.dev \
--to=hackintoshfive@gmail.com \
--cc=git@hack5.dev \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox