From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DCA0C433E0 for ; Tue, 5 Jan 2021 14:58:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A83722B4B for ; Tue, 5 Jan 2021 14:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbhAEO62 (ORCPT ); Tue, 5 Jan 2021 09:58:28 -0500 Received: from p3plsmtpa08-02.prod.phx3.secureserver.net ([173.201.193.103]:35125 "EHLO p3plsmtpa08-02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbhAEO61 (ORCPT ); Tue, 5 Jan 2021 09:58:27 -0500 X-Greylist: delayed 528 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Jan 2021 09:58:27 EST Received: from [192.168.0.116] ([71.184.94.153]) by :SMTPAUTH: with ESMTPSA id wndlk7fm2Goiawndlk52cS; Tue, 05 Jan 2021 07:48:54 -0700 X-CMAE-Analysis: v=2.4 cv=SvJVVNC0 c=1 sm=1 tr=0 ts=5ff47c56 a=vbvdVb1zh1xTTaY8rfQfKQ==:117 a=vbvdVb1zh1xTTaY8rfQfKQ==:17 a=IkcTkHD0fZMA:10 a=hpq3dx3UihE8fCEceWMA:9 a=q_WKLyjDcRPOdKFa:21 a=6WrFwjtl4syCEMyO:21 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: tom@talpey.com Subject: Re: [PATCH v2] systemd: rpc-statd-notify.service can run in the background To: Hackintosh 5 , linux-nfs@vger.kernel.org Cc: Hackintosh 5 References: <20210104185500.4018-1-git@hack5.dev> From: Tom Talpey Message-ID: Date: Tue, 5 Jan 2021 09:48:54 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20210104185500.4018-1-git@hack5.dev> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfNcumSPoSiYruaLzZWV6ABwK0cA8VSsnjDrLWD4/70uXzL1B7kE8ceD5ouvhZ5plMnUJ3EzsKJ8EUKHZNryVRCd5geOFbOv5UI524Rj1jYZzrNWNxaGF XvLJFvqfU9uR4LtJjOjoQGubJ3iWmIqocngM0EOTpkBZ8ACwfT48F7lAmx+s6UuXVBjqHEGBAKxa7Ic74PArplrS9ZBYSjUtKnHc8SHIiy3xJMNNzdjcpQIc nck3MWEBExr2W7iKmtauTQ== Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 >