Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5185792ybl; Wed, 22 Jan 2020 11:56:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyKyPu/LVlzSLDvUHUC8nZyiwV9BBBipDpqu+8+y/W68vhuYoLUmtZJhf9yjdoIS+AIALFa X-Received: by 2002:aca:c509:: with SMTP id v9mr7800236oif.151.1579722981415; Wed, 22 Jan 2020 11:56:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579722981; cv=none; d=google.com; s=arc-20160816; b=DODq7TDnUnl5KeAdq9h5gr8rzCZB+4kK//W2sIj4m2kCp+havTzF6oI9x7y0hqxDqI /zsyuYPJ7KeZgsADHNdLctGvyNzsiBq7NHhxQGbog7Y0zQ821GZlFXYUBqixpuJENoIr WmYvCm0eWGa2xH1nHzr1G1J8WGUx21AAPdgGF9XBh21un1x7QqEnoOm1oLQ7OIS9mOUa bDyRiw2BL4w4zFse8U7w3f2gO8vXBXopoOrP76rKCSUPzS2ueKaIXU5TmIdjuSLbYzrR EWedWhMTQZ3aBY1427KRBySl9dwOcoHd8VexOqhjo6A5mN3l73xlfK7/Msjq7Y9NU5nT Dl5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:content-language :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature; bh=ATXQxVfQbWJIgQw3/oEtTSU+qU+D47YRLOoi//94py4=; b=FeyormJzTxw6NzNDh7K34d4MXOyzpsgHSanyVxYDQmToT/GEQ+UsCQbWDGAAEYm57B FQr4oxZNohydKoZ7Pz32YrVGhE9XoazN6iS0jE4irRilrB28BaPw1e2b4bhVEfT0qb73 JUybrISi7i1VxrP2HMvSL3+EQyR9IR9M9y5Z9tfxcZ8BonKeSMzqlPLPAt/NkDrBGvkh OLFD577lDNqt/BbicVe9UHR9v1SH/IPcES8xlayGLRD7mCCtRF1TMH0Y6KdyJoh2Y9gP wf7AjbiXaI2TWMPFXRfH+MOvrI0c1/zwc7/BTM60bqgf6PYQPmucZphEHLLdVMcs7Cw3 oxqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MuF7EqjB; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si22147707oih.154.2020.01.22.11.56.01; Wed, 22 Jan 2020 11:56:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MuF7EqjB; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725928AbgAVT4A (ORCPT + 99 others); Wed, 22 Jan 2020 14:56:00 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:36691 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbgAVT4A (ORCPT ); Wed, 22 Jan 2020 14:56:00 -0500 Received: by mail-wr1-f47.google.com with SMTP id z3so435810wru.3; Wed, 22 Jan 2020 11:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=ATXQxVfQbWJIgQw3/oEtTSU+qU+D47YRLOoi//94py4=; b=MuF7EqjBMQ0XogfEQUpg7R3avQdsPvV2ZWUxljYl1l2VyOrXumex84/84DQCajzMHM 8TFimuACiPqBNgB6eQYmxW6beTcJ37ane7Y9AgQmMsJAzt9ulNK3Mb8pqAzAETNG8Bgp og1aFAvxCkx1XnxZlf7jRN91kNSEAyHZOKUIRq9TdxY3u59w1X2NCMGMuNksLktgdYnK e0ZOwmAXOq+Ql9juIcYCkfKsoDeK1y5NZP4q0tvtu41HhN3CCltI+ydcLdqDVRO3yqyp jSkdlibmsSkSZtI8CcLMUfpdGdDT+QO5R6DgCrsQfKlOHVy5wy9FU9mq+mLXuvYrSwbL tPfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:content-language :thread-index; bh=ATXQxVfQbWJIgQw3/oEtTSU+qU+D47YRLOoi//94py4=; b=rlYIdkzGDRvQiwjoBHN5mI2NKpOEXk43+eVW2wWDPWF6WD7KUkWivV9eABHgZMXJIN jrMjA9HfUQ8xd92KM4xACbFWK56m9Y5mKCTMy6LWvlS5m3d4rA41aYjVRdNp0Cn1gdQA vimRIIDtuxNAXQq5QeTHvdJfO9N9N6aO4i1o5c/Yv8DgmSh2PpTkjjDDGzL8xlO+1ir4 gSj6ByYtQ0nsuH8ZE1DoPi0IwbK6FbK+8owPLJhffmRF5N4plS/giVRhyycZpPuM5lqV qKMA2RihH5N/9R+fsY2ptuilFnY48J3q/YUKKjfZCWSIjqnTcI5w5OEkgGvrWa6ZPbSG q9Lg== X-Gm-Message-State: APjAAAUJQ/cghhyG42GTasUA0j443aveiobbfaIWVBK8TKZmUDUnkNPl d4eAWovf8a58cde/LMyfHGel13Rk2Dz8bw== X-Received: by 2002:a5d:6ac2:: with SMTP id u2mr12317905wrw.233.1579722958365; Wed, 22 Jan 2020 11:55:58 -0800 (PST) Received: from WINDOWSSS5SP16 ([82.31.89.128]) by smtp.gmail.com with ESMTPSA id q3sm5226956wmj.38.2020.01.22.11.55.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jan 2020 11:55:57 -0800 (PST) From: "Robert Milkowski" To: "'Schumaker, Anna'" , , Cc: , , References: <025801d5bf24$aa242100$fe6c6300$@gmail.com> <084f01d5cfba$bc5c4d10$3514e730$@gmail.com> <49e7b99bd1451a0dbb301915f655c73b3d9354df.camel@netapp.com> In-Reply-To: <49e7b99bd1451a0dbb301915f655c73b3d9354df.camel@netapp.com> Subject: RE: [PATCH v3] NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals Date: Wed, 22 Jan 2020 19:55:57 -0000 Message-ID: <075401d5d15d$f6d0cb20$e4726160$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQFSV8btGYpaKSSrODVQVe6EyfKpewKNWQiWAfB5jHQAou/4BajVBKRQ Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org > -----Original Message----- > From: Schumaker, Anna > Sent: 22 January 2020 19:11 > To: rmilkowski@gmail.com; chuck.lever@oracle.com; trondmy@hammerspace.com > Cc: linux-nfs@vger.kernel.org; linux-kernel@vger.kernel.org; > trond.myklebust@hammerspace.com > Subject: Re: [PATCH v3] NFSv4.0: nfs4_do_fsinfo() should not do implicit > lease renewals > > Hi Robert, > > On Mon, 2020-01-20 at 17:55 +0000, Robert Milkowski wrote: > > > -----Original Message----- > > > From: Chuck Lever > > > Sent: 30 December 2019 15:37 > > > To: Robert Milkowski > > > Cc: Linux NFS Mailing List ; Trond > > > Myklebust ; Anna Schumaker > > > ; linux-kernel@vger.kernel.org > > > Subject: Re: [PATCH v3] NFSv4.0: nfs4_do_fsinfo() should not do > > > implicit lease renewals > > > > > > > > > > > > > On Dec 30, 2019, at 10:20 AM, Robert Milkowski > > > > > > > wrote: > > > > From: Robert Milkowski > > > > > > > > Currently, each time nfs4_do_fsinfo() is called it will do an > > > > implicit > > > > NFS4 lease renewal, which is not compliant with the NFS4 > > > specification. > > > > This can result in a lease being expired by an NFS server. > > > > > > > > Commit 83ca7f5ab31f ("NFS: Avoid PUTROOTFH when managing leases") > > > > introduced implicit client lease renewal in nfs4_do_fsinfo(), > > > > which can result in the NFSv4.0 lease to expire on a server side, > > > > and servers returning NFS4ERR_EXPIRED or NFS4ERR_STALE_CLIENTID. > > > > > > > > This can easily be reproduced by frequently unmounting a > > > > sub-mount, then stat'ing it to get it mounted again, which will > > > > delay or even completely prevent client from sending RENEW > > > > operations if no other NFS operations are issued. Eventually nfs > > > > server will expire client's lease and return an error on file access > or next RENEW. > > > > > > > > This can also happen when a sub-mount is automatically unmounted > > > > due to inactivity (after nfs_mountpoint_expiry_timeout), then it > > > > is mounted again via stat(). This can result in a short window > > > > during which client's lease will expire on a server but not on a > client. > > > > This specific case was observed on production systems. > > > > > > > > This patch makes an explicit lease renewal instead of an implicit > > > > one, by adding RENEW to a compound operation issued by > > > > nfs4_do_fsinfo(), similarly to NFSv4.1 which adds SEQUENCE > operation. > > > > > > > > Fixes: 83ca7f5ab31f ("NFS: Avoid PUTROOTFH when managing leases") > > > > Signed-off-by: Robert Milkowski > > > > > > Reviewed-by: Chuck Lever > > > > > > > > > > How do we progress it further? > > Thanks for following up! I have the patch included in my linux-next branch > for the next merge window. > > Anna Nice. Thanks! -- Robert Milkowski