Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2827925ybi; Sun, 28 Jul 2019 18:56:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqz755i5fsI3FzOLy7dc7lcBljMMP7AS/hLH30KoAvWZecb+0MP9hQE+cl8m6VoDX7LYPUhX X-Received: by 2002:a17:90a:2343:: with SMTP id f61mr111058911pje.130.1564365380969; Sun, 28 Jul 2019 18:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564365380; cv=none; d=google.com; s=arc-20160816; b=bebLuO1n+zFsYhaWWq/L9aryTORNvNborLJp/nq8xgkeYutd0qpcl/hnucBRwedBHS BiZznnLGLMi2tskyjX5vIqopUeeAIj5zyLi0tE1kOTIJFjFlnsk/UoywZ7G9s/a8IWTf rQw3JY8V54EBjNkt8kWZPq8Ie3iaglYKPg4VHdjpHv/R8nXKjGPEH3zP5Bylxi/J+yDe brXRJMwiD3pNB4Vbb2Jh8+qWtBNe40NAMAuuYrySNNNiNRD0nqhCLKkb/8IAJYuAiEg6 pqFGS/amzutPbb2nMVHsW0UDYyBV4feLK5kUtqSGjoRk3sBmeDjP6xnVG39MJW4laUH0 5Vew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:references:cc:to:subject :from; bh=KGP7EmuFKNfrDUUUTBlv63ybnE/HI/Gsa/3upynu9s0=; b=mq3mwI3wcGC21RULvgyosXXDLo2A3lhIo82b7sf7FrfGNDnfHm6+gfdHSA+xA3OHTV XOMnN/WCELX5lBb9m4hTbE1fofi+3NliNQeYRDGkUuACZ5LXAMrwTSLXCb09w56DFDoj K7vinnrfEIGwS1BfzZjlOeMDQC8A4addftDcbC8brLSyqLt/LzEo8kdRzSpg1FcXyYJh +5N7x7TUbdjwJDCyowe9DQGpQtkAi4UN303nVweCM/Uk6xc+gCogKzY3NLbCJYBcef66 in7yDFCgp+8I5tiYyUYHasK2ekBNqOKYLHO3qfebmpzumhZ4ZakljNBabgkO3TAcPr3l E+nw== 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 a59si25345660plc.319.2019.07.28.18.55.50; Sun, 28 Jul 2019 18:56:20 -0700 (PDT) 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 S1726238AbfG2Bzu (ORCPT + 99 others); Sun, 28 Jul 2019 21:55:50 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:64301 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726216AbfG2Bzu (ORCPT ); Sun, 28 Jul 2019 21:55:50 -0400 X-IronPort-AV: E=Sophos;i="5.64,320,1559491200"; d="scan'208";a="72402861" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 29 Jul 2019 09:55:48 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 218384CDE65E; Mon, 29 Jul 2019 09:55:48 +0800 (CST) Received: from [10.167.226.33] (10.167.226.33) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jul 2019 09:55:52 +0800 From: Su Yanjun Subject: Re: [PATCH] CACHE: Fix test script as delegation being introduced To: CC: References: <89d5612e-9af6-8f2e-15d8-ff6af29d508a@redhat.com> <016101d5359b$c71f06c0$555d1440$@mindspring.com> <4d6599c3-2280-e919-b60f-905f86452ac1@cn.fujitsu.com> Message-ID: <2d2f5b86-682a-e5d3-b9d9-18573c84073d@cn.fujitsu.com> Date: Mon, 29 Jul 2019 09:54:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <4d6599c3-2280-e919-b60f-905f86452ac1@cn.fujitsu.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.33] X-yoursite-MailScanner-ID: 218384CDE65E.ABCB9 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: suyj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi bruce. 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. 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?) --b. > > Signed-off-by: Su Yanjun > --- > test/nfstest_cache | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/test/nfstest_cache b/test/nfstest_cache > index 0838418..a31d48f 100755 > --- a/test/nfstest_cache > +++ b/test/nfstest_cache > @@ -165,8 +165,13 @@ class CacheTest(TestUtil): > fd = None > attr = 'data' if data_cache else 'attribute' > header = "Verify consistency of %s caching with %s on a file" % > (attr, self.nfsstr()) > + > # Mount options > - mtopts = "hard,intr,rsize=4096,wsize=4096" > + if self.nfsversion >= 4: > + mtopts = "noatime,hard,intr,rsize=4096,wsize=4096" > + else: + mtopts = "hard,intr,rsize=4096,wsize=4096" > + > if actimeo: > header += " actimeo = %d" % actimeo > mtopts += ",actimeo=%d" % actimeo > @@ -216,6 +221,11 @@ class CacheTest(TestUtil): > if fstat.st_size != dlen: > raise Exception("Size of newly created file is %d, should have been > %d" %(fstat.st_size, dlen)) > + if self.nfsversion >= 4: > + # revoke delegation > + self.dprint('DBG3', "revoke delegation") > + self.clientobj.run_cmd('chmod +x %s' % self.absfile) > + > if acregmax: > # Stat the unchanging file until acregmax is hit > # each stat doubles the valid cache time > > -- > 2.7.4 > >