* [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times
@ 2019-04-29 9:32 ZhangXiaoxu
2019-05-04 6:15 ` zhangxiaoxu (A)
0 siblings, 1 reply; 4+ messages in thread
From: ZhangXiaoxu @ 2019-04-29 9:32 UTC (permalink / raw)
To: trond.myklebust, anna.schumaker, bfields, jlayton, davem,
linux-nfs, zhangxiaoxu5
If the rpc.gssd always return cred success, but now the cred is
expired, then the task will loop in call_refresh and call_transmit.
Exit the rpc task after retry.
Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
---
net/sunrpc/clnt.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 8ff11dc..a32d3f1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1793,7 +1793,14 @@ call_encode(struct rpc_task *task)
rpc_delay(task, HZ >> 4);
break;
case -EKEYEXPIRED:
- task->tk_action = call_refresh;
+ if (!task->tk_cred_retry) {
+ rpc_exit(task, task->tk_status);
+ } else {
+ task->tk_action = call_refresh;
+ task->tk_cred_retry--;
+ dprintk("RPC: %5u %s: retry refresh creds\n",
+ task->tk_pid, __func__);
+ }
break;
default:
rpc_exit(task, task->tk_status);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times
2019-04-29 9:32 [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times ZhangXiaoxu
@ 2019-05-04 6:15 ` zhangxiaoxu (A)
2019-05-13 1:48 ` zhangxiaoxu (A)
0 siblings, 1 reply; 4+ messages in thread
From: zhangxiaoxu (A) @ 2019-05-04 6:15 UTC (permalink / raw)
To: trond.myklebust, anna.schumaker, bfields, jlayton, davem, linux-nfs
ping.
On 4/29/2019 5:32 PM, ZhangXiaoxu wrote:
> If the rpc.gssd always return cred success, but now the cred is
> expired, then the task will loop in call_refresh and call_transmit.
>
> Exit the rpc task after retry.
>
> Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
> ---
> net/sunrpc/clnt.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 8ff11dc..a32d3f1 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -1793,7 +1793,14 @@ call_encode(struct rpc_task *task)
> rpc_delay(task, HZ >> 4);
> break;
> case -EKEYEXPIRED:
> - task->tk_action = call_refresh;
> + if (!task->tk_cred_retry) {
> + rpc_exit(task, task->tk_status);
> + } else {
> + task->tk_action = call_refresh;
> + task->tk_cred_retry--;
> + dprintk("RPC: %5u %s: retry refresh creds\n",
> + task->tk_pid, __func__);
> + }
> break;
> default:
> rpc_exit(task, task->tk_status);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times
2019-05-04 6:15 ` zhangxiaoxu (A)
@ 2019-05-13 1:48 ` zhangxiaoxu (A)
2019-05-20 17:59 ` Schumaker, Anna
0 siblings, 1 reply; 4+ messages in thread
From: zhangxiaoxu (A) @ 2019-05-13 1:48 UTC (permalink / raw)
To: trond.myklebust, anna.schumaker, bfields, jlayton, davem, linux-nfs
ping.
On 5/4/2019 2:15 PM, zhangxiaoxu (A) wrote:
> ping.
>
> On 4/29/2019 5:32 PM, ZhangXiaoxu wrote:
>> If the rpc.gssd always return cred success, but now the cred is
>> expired, then the task will loop in call_refresh and call_transmit.
>>
>> Exit the rpc task after retry.
>>
>> Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
>> ---
>> net/sunrpc/clnt.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
>> index 8ff11dc..a32d3f1 100644
>> --- a/net/sunrpc/clnt.c
>> +++ b/net/sunrpc/clnt.c
>> @@ -1793,7 +1793,14 @@ call_encode(struct rpc_task *task)
>> rpc_delay(task, HZ >> 4);
>> break;
>> case -EKEYEXPIRED:
>> - task->tk_action = call_refresh;
>> + if (!task->tk_cred_retry) {
>> + rpc_exit(task, task->tk_status);
>> + } else {
>> + task->tk_action = call_refresh;
>> + task->tk_cred_retry--;
>> + dprintk("RPC: %5u %s: retry refresh creds\n",
>> + task->tk_pid, __func__);
>> + }
>> break;
>> default:
>> rpc_exit(task, task->tk_status);
>>
>
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times
2019-05-13 1:48 ` zhangxiaoxu (A)
@ 2019-05-20 17:59 ` Schumaker, Anna
0 siblings, 0 replies; 4+ messages in thread
From: Schumaker, Anna @ 2019-05-20 17:59 UTC (permalink / raw)
To: bfields, linux-nfs, zhangxiaoxu5, jlayton, trond.myklebust, davem
Hi ZhangXiaoxu
Both of your patches have been merged into Linux 5.2-rc1.
Thanks for checking!
Anna
On Mon, 2019-05-13 at 09:48 +0800, zhangxiaoxu (A) wrote:
> ping.
>
> On 5/4/2019 2:15 PM, zhangxiaoxu (A) wrote:
> > ping.
> >
> > On 4/29/2019 5:32 PM, ZhangXiaoxu wrote:
> > > If the rpc.gssd always return cred success, but now the cred is
> > > expired, then the task will loop in call_refresh and call_transmit.
> > >
> > > Exit the rpc task after retry.
> > >
> > > Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
> > > ---
> > > net/sunrpc/clnt.c | 9 ++++++++-
> > > 1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> > > index 8ff11dc..a32d3f1 100644
> > > --- a/net/sunrpc/clnt.c
> > > +++ b/net/sunrpc/clnt.c
> > > @@ -1793,7 +1793,14 @@ call_encode(struct rpc_task *task)
> > > rpc_delay(task, HZ >> 4);
> > > break;
> > > case -EKEYEXPIRED:
> > > - task->tk_action = call_refresh;
> > > + if (!task->tk_cred_retry) {
> > > + rpc_exit(task, task->tk_status);
> > > + } else {
> > > + task->tk_action = call_refresh;
> > > + task->tk_cred_retry--;
> > > + dprintk("RPC: %5u %s: retry refresh creds\n",
> > > + task->tk_pid, __func__);
> > > + }
> > > break;
> > > default:
> > > rpc_exit(task, task->tk_status);
> > >
> >
> > .
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-20 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 9:32 [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times ZhangXiaoxu
2019-05-04 6:15 ` zhangxiaoxu (A)
2019-05-13 1:48 ` zhangxiaoxu (A)
2019-05-20 17:59 ` Schumaker, Anna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).