Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp553272ybg; Mon, 1 Jun 2020 08:15:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi+reZ6Gc4EeHZZv9A1Ep+PDa/RpsoOAL/VKyGiklKtZIi7oCe0lxb4SArC0Wv1gsBnYCr X-Received: by 2002:a17:906:af84:: with SMTP id mj4mr13975993ejb.473.1591024540294; Mon, 01 Jun 2020 08:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591024540; cv=none; d=google.com; s=arc-20160816; b=sbrF+7XJGZH2YRnL4Rc5dUXAPParr3N5kmyfJwaC5taSShzwZgZip/yobWyPSK4Nn+ T/6SaHfM+9MauSEJrNIRLVMGRIfzT+mYr67bNCMq1bSuHiZuwZllVDpAqNdp3QgNaYhs dMTdePi9DEpxQv5bdEsSwX64KZala3O/vbFJbt6YjyfNVTyN4wGS/t7O7jEYmK4RdKYB bO1Qo87k69FAT2k7G22ppC+ja3+E6l5DTgYc7tB6Zmk4akvb99vSeFdDN5fO6hMj1xQF /rbCX5witVJScK0xbt+f7wDOhKCyAXEBe+KFyngocj3LtkEBheswRB+bZSx9j+f9/poi //3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pCrXJ03db7VYYYF7gmziJuuKS894/lFYNW1XlUnGtHY=; b=GZBtKtNBnnBQ6pNUtpurN+ha20Z+ky95a+MiCvblus3KWZlp2DuiIOhktSeSUjfQ2h kNNo70JID2lTlcIUeTFFFb533u5EYF+jOUp5WugGtVjJdn9p567Hs5Ul6WxwqG4sxvyr 3tVAO5qTUnkX0bj+I822bJAFPEevkiSMDKSZXbcfxsarpTMRcd0hXZUsqk+OyHH3VeBJ nJ4v2m7U7maBd0o75wE3sxgjolUqoE28rN2Ar3qA8jtiQnZpc2B4ERHQLXamk4H+ck/k oINpCeJqHkaRdGYGvLM2kRZAfWlJR1TmJep9WilfTryDbcpfin5hgQec6NGlLFTKk5lZ e5Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QJAcpt3A; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x25si12028729ejs.242.2020.06.01.08.15.08; Mon, 01 Jun 2020 08:15:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QJAcpt3A; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726075AbgFAPO6 (ORCPT + 99 others); Mon, 1 Jun 2020 11:14:58 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:39803 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727013AbgFAPO6 (ORCPT ); Mon, 1 Jun 2020 11:14:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591024496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pCrXJ03db7VYYYF7gmziJuuKS894/lFYNW1XlUnGtHY=; b=QJAcpt3An2lkA1ewwsnbl/wR4um+X4Ie2T/7f1B5vjbLFRQ8bEuX2vnQyfVR2uNsOWrq7x 1zZTMu14jCHs1iQsNiUZ5KGig8mbkCGZ3SIe87U/pU6Jpa+NpVUiw68nkd+ai1PU+mmhtV kQf8lhHf7sxDAxzb4N63Ib6+HDHTnOc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-484-L0Ifay-oNR-USfFWJ-nOEQ-1; Mon, 01 Jun 2020 11:14:51 -0400 X-MC-Unique: L0Ifay-oNR-USfFWJ-nOEQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BD3D18FE895; Mon, 1 Jun 2020 15:14:50 +0000 (UTC) Received: from pick.fieldses.org (ovpn-116-242.rdu2.redhat.com [10.10.116.242]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AC525D9C9; Mon, 1 Jun 2020 15:14:50 +0000 (UTC) Received: by pick.fieldses.org (Postfix, from userid 2815) id 2F6B81203A7; Mon, 1 Jun 2020 11:14:49 -0400 (EDT) Date: Mon, 1 Jun 2020 11:14:49 -0400 From: "J. Bruce Fields" To: "Su, Yanjun" Cc: "linux-nfs@vger.kernel.org" , "mora@netapp.com" Subject: Re: [About] about nfscache problem Message-ID: <20200601151449.GA170596@pick.fieldses.org> References: <8ad54ded2abb484e8df280bd257242bb@G08CNEXMBPEKD05.g08.fujitsu.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ad54ded2abb484e8df280bd257242bb@G08CNEXMBPEKD05.g08.fujitsu.local> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, May 28, 2020 at 07:18:31AM +0000, Su, Yanjun wrote: > Hi Bruce > > >On Mon, Apr 20, 2020 at 08:13:51AM +0000, Su, Yanjun wrote: > >> At this time, the nfscache problem has not progressed for long time. Do we still need to follow it? > >> > >> The problem is as below > >> 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 > >> > >> More detail info is here: > >> https://linuxlists.cc/l/17/linux-nfs/t/3063683/(patch)_cache:_fix_test_script_as_delegation_being_introduced > >> > >> 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. > >> > >> After a discusion with you, a chmod is a reliable way to recall delegations. > >> > >> Can you contact mora and make a decision for it? > > >I don't have any better way to contact him than the address cc'd above. > > >Remind me what the problem is? How is the test failing? > > 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. So, you patch nfstest as below, then run the test, and the test fails? --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 > >