public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Hackintosh 5 <hackintoshfive@gmail.com>, linux-nfs@vger.kernel.org
Cc: Hackintosh 5 <git@hack5.dev>
Subject: Re: [PATCH v2] systemd: rpc-statd-notify.service can run in the background
Date: Tue, 5 Jan 2021 09:48:54 -0500	[thread overview]
Message-ID: <dfd19b53-b774-989d-43ef-adee5bf71c42@talpey.com> (raw)
In-Reply-To: <20210104185500.4018-1-git@hack5.dev>

On 1/4/2021 1:55 PM, Hackintosh 5 wrote:
> 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.

I'm concerned that this change may allow the nfs client to start
before the sm-notify has a chance to send its "I'm back" message
to the server, and for the server to process it. This will lead
to lock failures.

Also, I'm unclear how an apparently arbitrary 1-second delay is
fixing this. Is this really a systemd thing? If so, changing the
NFS behavior is the wrong approach.

Tom.

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

      reply	other threads:[~2021-01-05 14:58 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               ` [PATCH v2] systemd: rpc-statd-notify.service can run in the background Hackintosh 5
2021-01-05 14:48                 ` Tom Talpey [this message]

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=dfd19b53-b774-989d-43ef-adee5bf71c42@talpey.com \
    --to=tom@talpey.com \
    --cc=git@hack5.dev \
    --cc=hackintoshfive@gmail.com \
    --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