public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] DELEG6: Return delegations so clean_diff() works
@ 2022-08-05 16:12 Chuck Lever
  2022-08-05 16:12 ` [PATCH 2/2] DELEG21: " Chuck Lever
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2022-08-05 16:12 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

WARNING: could not clean testdir due to:
Making sure b'DELEG6-1' is writable: operation OP_SETATTR should return NFS4_OK, instead got NFS4ERR_DELAY

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 nfs4.0/servertests/st_delegation.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index 875dbc94ded1..ff042cdb69a8 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -285,7 +285,7 @@ def testRenew(t, env, funct=None, response=NFS4_OK):
     c = env.c1
     c.init_connection(b'pynfs%i_%s' % (os.getpid(), t.word()), cb_ident=0)
     lease = c.getLeaseTime()
-    _get_deleg(t, c, c.homedir + [t.word()], funct, response)
+    deleg_info, fh, stateid = _get_deleg(t, c, c.homedir + [t.word()], funct, response)
     c2 = env.c2
     c2.init_connection()
     try:
@@ -302,6 +302,10 @@ def testRenew(t, env, funct=None, response=NFS4_OK):
                 break
     finally:
         c.cb_command(1) # Turn on callback server
+    res = c.compound([op.putfh(fh), op.delegreturn(deleg_info.read.stateid)])
+    check(res)
+    res = c.close_file(t.word(), fh, stateid)
+    check(res)
     if not noticed:
         t.fail("RENEWs should not have all returned OK")
 



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] DELEG21: Return delegations so clean_diff() works
  2022-08-05 16:12 [PATCH 1/2] DELEG6: Return delegations so clean_diff() works Chuck Lever
@ 2022-08-05 16:12 ` Chuck Lever
  2022-08-07 20:18   ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2022-08-05 16:12 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

WARNING: could not clean testdir due to:
Making sure b'DELEG21-1' is writable: operation OP_SETATTR should return NFS4_OK, instead got NFS4ERR_DELAY

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 nfs4.0/servertests/st_delegation.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index ff042cdb69a8..9c98ec0e0fb3 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -731,7 +731,7 @@ def testServerSelfConflict(t, env):
     c = env.c1
     count = c.cb_server.opcounts[OP_CB_RECALL]
     c.init_connection(b'pynfs%i_%s' % (os.getpid(), t.word()), cb_ident=0)
-    _get_deleg(t, c, c.homedir + [t.word()], None, NFS4_OK)
+    deleg_info, fh, stateid = _get_deleg(t, c, c.homedir + [t.word()], None, NFS4_OK)
 
     sleeptime = 1
     while 1:
@@ -746,6 +746,10 @@ def testServerSelfConflict(t, env):
         check(res, [NFS4_OK, NFS4ERR_DELAY], "Open which causes recall")
         env.sleep(sleeptime, 'Got NFS4ERR_DELAY on open')
     c.confirm(b'newowner', res)
+    res = c.compound([op.putfh(fh), op.delegreturn(deleg_info.read.stateid)])
+    check(res)
+    res = c.close_file(t.word(), fh, stateid)
+    check(res)
     newcount = c.cb_server.opcounts[OP_CB_RECALL]
     if newcount > count:
         t.fail("Unnecessary delegation recall")



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] DELEG21: Return delegations so clean_diff() works
  2022-08-05 16:12 ` [PATCH 2/2] DELEG21: " Chuck Lever
@ 2022-08-07 20:18   ` J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2022-08-07 20:18 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

On Fri, Aug 05, 2022 at 12:12:26PM -0400, Chuck Lever wrote:
> WARNING: could not clean testdir due to:
> Making sure b'DELEG21-1' is writable: operation OP_SETATTR should return NFS4_OK, instead got NFS4ERR_DELAY

Thanks, both applied.--b.

> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  nfs4.0/servertests/st_delegation.py |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
> index ff042cdb69a8..9c98ec0e0fb3 100644
> --- a/nfs4.0/servertests/st_delegation.py
> +++ b/nfs4.0/servertests/st_delegation.py
> @@ -731,7 +731,7 @@ def testServerSelfConflict(t, env):
>      c = env.c1
>      count = c.cb_server.opcounts[OP_CB_RECALL]
>      c.init_connection(b'pynfs%i_%s' % (os.getpid(), t.word()), cb_ident=0)
> -    _get_deleg(t, c, c.homedir + [t.word()], None, NFS4_OK)
> +    deleg_info, fh, stateid = _get_deleg(t, c, c.homedir + [t.word()], None, NFS4_OK)
>  
>      sleeptime = 1
>      while 1:
> @@ -746,6 +746,10 @@ def testServerSelfConflict(t, env):
>          check(res, [NFS4_OK, NFS4ERR_DELAY], "Open which causes recall")
>          env.sleep(sleeptime, 'Got NFS4ERR_DELAY on open')
>      c.confirm(b'newowner', res)
> +    res = c.compound([op.putfh(fh), op.delegreturn(deleg_info.read.stateid)])
> +    check(res)
> +    res = c.close_file(t.word(), fh, stateid)
> +    check(res)
>      newcount = c.cb_server.opcounts[OP_CB_RECALL]
>      if newcount > count:
>          t.fail("Unnecessary delegation recall")
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-07 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-05 16:12 [PATCH 1/2] DELEG6: Return delegations so clean_diff() works Chuck Lever
2022-08-05 16:12 ` [PATCH 2/2] DELEG21: " Chuck Lever
2022-08-07 20:18   ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox