Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3490307ybi; Mon, 29 Jul 2019 07:27:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqydNtpGs+XTutlBnyQQlQXLxlyLjY4azMMAoJ8AdHGx1F4cJ+ZFDkZZf7HrjL3p3TAQW6Rm X-Received: by 2002:a62:187:: with SMTP id 129mr37267049pfb.128.1564410463428; Mon, 29 Jul 2019 07:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564410463; cv=none; d=google.com; s=arc-20160816; b=sOSfQH0/TNdvI9uSLZVbo8x68DvruPvYTzI4sDYIMeAyjh+FDDRwrOj9IaA3tJnRgn Oj/UQjwurbag8OvbHql4pjZS8NWvLPwFJaBm9t6n2ltXUKhTLUUwKq8+3O9FusbG/mzt RTmQwT43Pt9s7APzx+iIGiyHJisbaYG1ZgfsZKox55xXWaUFzEYJcF/Qwf7lA3oK4gPv AQOj5eh7ko9HxaydnDT07DuCGCUZWpUuYYx2S7V/05MpC0WUS1OyTM+TYyNuTDyWI2x7 FVLuk5KFiPBVXEwRPWTeBGRshwBWFTJ60eCgs2ZmVmcH93WGhsUNuff5VFhVRjOJWBfr 7h/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1I1WwgDXJhh+Tuva6YPuunwm3cSQkPUBSiNCY6cVLwg=; b=vYKNerEUwhbUWuBzsbAkPgmBYQa5e9NbtKNtuW+IgErgJqrYQR/HigDB7bFvj2Od6Q 1zWBDMCClhcwVn74pyvAm+USVpkwQpF3woizp6eI1F1eZRXnKwaWYChZm0GnBt7G/rXz HxpEgP1EgV26DmY1UeP4Zkyoml9+6viKGf8Oy79X4mh8JUfSMpZB+AEEwRkYzIaT22Q/ FWPP++bajqwU8RK0bqATtPcWrQUeRgdZkg8fitdyIWXdasVI7sNYB9jTRyUCxWX+zyiW MRnrsqhgbvEwjVKsF3m/euHErY9HEPD7Jz/YiPQeCWS4NVKOjq+G2yM/OC/7GZIQQezT uD+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=raaJR6Va; 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=NONE dis=NONE) header.from=umich.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v141si31100243pgb.183.2019.07.29.07.27.28; Mon, 29 Jul 2019 07:27:43 -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; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=raaJR6Va; 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=NONE dis=NONE) header.from=umich.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbfG2OLs (ORCPT + 99 others); Mon, 29 Jul 2019 10:11:48 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:42090 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727244AbfG2OLs (ORCPT ); Mon, 29 Jul 2019 10:11:48 -0400 Received: by mail-vs1-f66.google.com with SMTP id 190so40828120vsf.9 for ; Mon, 29 Jul 2019 07:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1I1WwgDXJhh+Tuva6YPuunwm3cSQkPUBSiNCY6cVLwg=; b=raaJR6Val7tr6K4JaeEpHNQ9LVhobYsP6Ush0r+GSJzR0an6uKk1LL5Om4SR7/EpUn HR8lzfgWTE8aHvZZr62LSGpoJ/C9TjGfg2/FYrsbrJWEnrTByKeyRm7b+DFWx3EVmFLq QdXYJk7AcpFv1dra/dit2h0LwfHpHMM2R+s4lSuk9vp6CUSk1/bhxZ3+dm7wKsFJgpuy CoAwwi10IKQXG2kv2lRdNXYxbTkdsyXWRxc5cqVw3355v9YUhOLeIhRmd4LACL4enUu+ QTjNLiy/NVQfn/C2mSWGRzP9sxMF9TPYf3I7rAZnXjVj+30m2C+CoUF7lTFFFrAZIMRF BnmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1I1WwgDXJhh+Tuva6YPuunwm3cSQkPUBSiNCY6cVLwg=; b=uBgdLyN+Z+Ubkeg3veEFlfjNRY0Hmm5Fqt6yluPvbWJTFkcRSBBkmJ1/VK+9hQz4ur 6VSuqRq/IqDJQAtQt+H/MT31znFOBNdajt4qpRtj1Zfrbcn2bha0qBWPPm7II/4a7Fbw FjNo0gCJ0vEFnqkmeqQ6V04aiSWpiLyIjHbvlOh7Vpl/rXNisAYnJzMg8DzJxzyjCSNh X5++Q+QHXx/yYrC3Rti2sBk0p96gDd+DGs6HuCwkTlPui3iXVUhJK6hNI9QiKly+jjH1 +oiur6v6ienPFuaslphnivm4n40ABWAtr/vByRH5sBPK4DBBzHkRRVGd+sVJvVvXJYPV WmMA== X-Gm-Message-State: APjAAAVDTTKHd5AuhOvb5ulNcISofDDysgeM4DsdTNDk7p/qhz3R3mtz evQaw58yILh5TnE7f5RiF57ouUfEj85e5LtCgyE= X-Received: by 2002:a67:dc1:: with SMTP id 184mr8623268vsn.164.1564409507330; Mon, 29 Jul 2019 07:11:47 -0700 (PDT) MIME-Version: 1.0 References: <89d5612e-9af6-8f2e-15d8-ff6af29d508a@redhat.com> <016101d5359b$c71f06c0$555d1440$@mindspring.com> <4d6599c3-2280-e919-b60f-905f86452ac1@cn.fujitsu.com> <2d2f5b86-682a-e5d3-b9d9-18573c84073d@cn.fujitsu.com> In-Reply-To: <2d2f5b86-682a-e5d3-b9d9-18573c84073d@cn.fujitsu.com> From: Olga Kornievskaia Date: Mon, 29 Jul 2019 10:11:36 -0400 Message-ID: Subject: Re: [PATCH] CACHE: Fix test script as delegation being introduced To: Su Yanjun Cc: "J. Bruce Fields" , linux-nfs , Jorge Mora Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Su, For nfstest patches, you should cc nfstest maintainer (Jorge Mora mora@netapp.com). On Sun, Jul 28, 2019 at 9:56 PM Su Yanjun wrote: > > 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 > > > > > > >