All of lore.kernel.org
 help / color / mirror / Atom feed
From: Su Yanjun <suyj.fnst@cn.fujitsu.com>
To: <bfields@fieldses.org>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] CACHE: Fix test script as delegation being introduced
Date: Mon, 29 Jul 2019 09:54:23 +0800	[thread overview]
Message-ID: <2d2f5b86-682a-e5d3-b9d9-18573c84073d@cn.fujitsu.com> (raw)
In-Reply-To: <4d6599c3-2280-e919-b60f-905f86452ac1@cn.fujitsu.com>

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<suyj.fnst@cn.fujitsu.com>  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 <suyj.fnst@cn.fujitsu.com>
> ---
> 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
> 
>




  parent reply	other threads:[~2019-07-29  1:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  1:34 [Problem]testOpenUpgradeLock test failed in nfsv4.0 in 5.2.0-rc7 Su Yanjun
2019-07-08  2:20 ` Su Yanjun
2019-07-08 13:48   ` Daniel Gryniewicz
2019-07-08 14:45     ` Frank Filz
2019-07-09  5:27       ` Su Yanjun
2019-07-10  0:08         ` J. Bruce Fields
2019-07-12  2:27           ` Su Yanjun
2019-07-29  7:49             ` Su Yanjun
2019-07-29 13:12               ` Calum Mackay
2019-07-29  1:54         ` Su Yanjun [this message]
2019-07-29 14:11           ` [PATCH] CACHE: Fix test script as delegation being introduced Olga Kornievskaia
2019-08-06  8:23         ` [Problem]testOpenUpgradeLock test failed in nfsv4.0 in 5.2.0-rc7 Su Yanjun
     [not found] <890610570fcd48d8b28b30e89f1f0038@G08CNEXMBPEKD05.g08.fujitsu.local>
2020-01-09 15:36 ` [PATCH] CACHE: Fix test script as delegation being introduced bfields
  -- strict thread matches above, loose matches on Subject: below --
2019-04-08  2:47 Su Yanjun <suyj.fnst@cn.fujitsu.com>
2019-04-08 16:07 ` J. Bruce Fields
2019-01-24  2:30 Su Yanjun
2019-02-19  1:00 ` Su Yanjun <suyj.fnst@cn.fujitsu.com>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d2f5b86-682a-e5d3-b9d9-18573c84073d@cn.fujitsu.com \
    --to=suyj.fnst@cn.fujitsu.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.