diff mbox

[1/1] NFS4.1 handle interrupted slot reuse from ERR_DELAY

Message ID 20170422163139.97844-1-kolga@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Olga Kornievskaia April 22, 2017, 4:31 p.m. UTC
If the RPC slot was interrupted and server replied to the next
operation on the "reused" slot with ERR_DELAY, don't clear out
the "interrupted" flag until we properly recover.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs4proc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Trond Myklebust April 26, 2017, 4:42 p.m. UTC | #1
On Sat, 2017-04-22 at 12:31 -0400, Olga Kornievskaia wrote:
> If the RPC slot was interrupted and server replied to the next

> operation on the "reused" slot with ERR_DELAY, don't clear out

> the "interrupted" flag until we properly recover.

> 

> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>

> ---

>  fs/nfs/nfs4proc.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c

> index 0d3347e..a15979c 100644

> --- a/fs/nfs/nfs4proc.c

> +++ b/fs/nfs/nfs4proc.c

> @@ -697,7 +697,8 @@ static int nfs41_sequence_process(struct rpc_task

> *task,

>  	session = slot->table->session;

>  

>  	if (slot->interrupted) {

> -		slot->interrupted = 0;

> +		if (task->tk_status != -NFS4ERR_DELAY)

> +			slot->interrupted = 0;


This is only correct if the NFS4ERR_DELAY is on the sequence op itself.
Can we therefore please correct this to check res->sr_status instead?

>  		interrupted = true;

>  	}

>  

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
diff mbox

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0d3347e..a15979c 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -697,7 +697,8 @@  static int nfs41_sequence_process(struct rpc_task *task,
 	session = slot->table->session;
 
 	if (slot->interrupted) {
-		slot->interrupted = 0;
+		if (task->tk_status != -NFS4ERR_DELAY)
+			slot->interrupted = 0;
 		interrupted = true;
 	}