Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2358444ybl; Thu, 9 Jan 2020 11:18:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwjHKc3flvQnFjt3yMio5M0YrsofboceehwME/JIuZkNvFXIPKoaCuZzQaXBE0PfRq64DTO X-Received: by 2002:aca:5188:: with SMTP id f130mr4663870oib.47.1578597522189; Thu, 09 Jan 2020 11:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578597522; cv=none; d=google.com; s=arc-20160816; b=TeLZotq1PnDxZ9/iNjZy2iQcgOQO0poxk8eTuTRnIvxD3H/LLGtIngOOmw1sEz98xH Dqb9Q9gQ16xuuoa3JfcPnt/YhKhS6zAqwH8U/+jT5J6ml8TJuqaEfNZi6EbXG7HjIHGJ AMkYQ0rtgiySyt93TyDxQi94nXqD+BN/jKZxjt/JPNT+CCfsI81akAg4ADCe5ZHwXhKg dyB7/MQtQuRjdLUeL5SncPNwZVci5C0tGbPCENMTo62HUvt++crE9rW8T9OOiKyX1GG6 7dO8jYVbdUCsHX0yk2tmvh+exIUZtP0gk9setS8HoXeF3bfy1JiZ4wz0pnLDpaWSjGel 0OTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=t4/BinxAzM2E4vTp3x44KUEj91u+jDuWD+JH3CTMXnI=; b=hv+enqG5wziXB3swosNoc/+ypKHSm/Iz9pYGA3rtIAy6iLq8ppQIUJPom4Azy9Xn46 V4mFe6NY6NVk8aR2rWXTwPtTQhwPfCeALG4EzJZQfm2hRHywR9nvEVpYYUwcJ/riN51h sam1jdxgDRHefibfMFb+rJC4GwsZeh38kpCKIefglLaZe2U1e+oNKxEO/R0PdtxXEDvJ KNGZmipo5lQQFoEyPuOVQqKaxcwrbBrwKFXOPAblh+rH1iyUgnhZ7WiIyhImqpXsipC3 O/vrp7m28Nt2ab++qKa97AEFhFilk0ftbo1uiDvfs+CbWD4Y0L0vgx55mtkvsWDgO09V bMwg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si3963699oiv.13.2020.01.09.11.18.23; Thu, 09 Jan 2020 11:18:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729076AbgAIPgt (ORCPT + 99 others); Thu, 9 Jan 2020 10:36:49 -0500 Received: from fieldses.org ([173.255.197.46]:54982 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728098AbgAIPgs (ORCPT ); Thu, 9 Jan 2020 10:36:48 -0500 Received: by fieldses.org (Postfix, from userid 2815) id 4D276AAD; Thu, 9 Jan 2020 10:36:48 -0500 (EST) Date: Thu, 9 Jan 2020 10:36:48 -0500 From: "bfields@fieldses.org" To: "Su, Yanjun" Cc: "linux-nfs@vger.kernel.org" , "mora@netapp.com" Subject: Re: [PATCH] CACHE: Fix test script as delegation being introduced Message-ID: <20200109153648.GA20670@fieldses.org> References: <890610570fcd48d8b28b30e89f1f0038@G08CNEXMBPEKD05.g08.fujitsu.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <890610570fcd48d8b28b30e89f1f0038@G08CNEXMBPEKD05.g08.fujitsu.local> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jan 09, 2020 at 01:54:51AM +0000, Su, Yanjun wrote: > Any ping about the 1 year old problem? > Cc mora: > Did you test nfs cache with nfs version 4? > Or maybe the test case is not suitable for v4? I don't run it personally. Jorge, is it expected to fail in the presence of delegations? > Sorry for my late reply. Our mail system has some problem that ignores your reply. > > I Get the reply by google seach. > > We tested the option "clientaddr=0.0.0.0" and the test case also fails. > > Thanks > > On Mon, Apr 08, 2019 at 10:47:56AM +0800, Su Yanjun wrote: > > When we run nfstest_cache with nfsversion=4, it fails. > As i know nfsv4 introduces delegation, so nfstest_cache runs fail > since nfsv4. > > The test commandline is as below: > ./nfstest_cache --nfsversion=4 -e /nfsroot --server 192.168.102.143 > --client 192.168.102.142 --runtest acregmax_data --verbose all > > This patch adds compatible code for nfsv3 and nfsv4. > When we test nfsv4, just use 'chmod' to recall delegation, then > run the test. As 'chmod' will modify atime, so use 'noatime' mount option. > > I don't think a chmod is a reliable way to recall delegations. If you run the chmod from the same client, it won't necessarily revoke the delegation. If you run it from another client or run it directly on the server, it should. > Maybe mount with "clientaddr=0.0.0.0"? From the nfs man page: > > Can specify a value of IPv4_ANY (0.0.0.0) or equivalent IPv6 > any address which will signal to the NFS server that this NFS > client does not want delegations. > > (I wonder if that documentation's still accurate for versions >= 4.1?) Probably not. I don't think there's a way to turn off delegations from the linux client. The server may have a way to turn off delegations. E.g. on a linux server "echo 0>/proc/sys/fs/leases-enable" before starting knfsd should do it. --b.