Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
fb43d172
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fb43d172
编写于
1月 30, 2016
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: Use the multipath iterator to assign a transport to each task
Signed-off-by:
N
Trond Myklebust
<
trond.myklebust@primarydata.com
>
上级
ad01b2c6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
36 deletion
+28
-36
include/linux/sunrpc/sched.h
include/linux/sunrpc/sched.h
+2
-0
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+20
-18
net/sunrpc/rpcb_clnt.c
net/sunrpc/rpcb_clnt.c
+2
-4
net/sunrpc/xprt.c
net/sunrpc/xprt.c
+3
-11
net/sunrpc/xprtsock.c
net/sunrpc/xprtsock.c
+1
-3
未找到文件。
include/linux/sunrpc/sched.h
浏览文件 @
fb43d172
...
...
@@ -69,6 +69,8 @@ struct rpc_task {
const
struct
rpc_call_ops
*
tk_ops
;
/* Caller callbacks */
struct
rpc_clnt
*
tk_client
;
/* RPC client */
struct
rpc_xprt
*
tk_xprt
;
/* Transport */
struct
rpc_rqst
*
tk_rqstp
;
/* RPC request */
struct
workqueue_struct
*
tk_workqueue
;
/* Normally rpciod, but could
...
...
net/sunrpc/clnt.c
浏览文件 @
fb43d172
...
...
@@ -894,6 +894,7 @@ EXPORT_SYMBOL_GPL(rpc_bind_new_program);
void
rpc_task_release_client
(
struct
rpc_task
*
task
)
{
struct
rpc_clnt
*
clnt
=
task
->
tk_client
;
struct
rpc_xprt
*
xprt
=
task
->
tk_xprt
;
if
(
clnt
!=
NULL
)
{
/* Remove from client task list */
...
...
@@ -904,13 +905,22 @@ void rpc_task_release_client(struct rpc_task *task)
rpc_release_client
(
clnt
);
}
if
(
xprt
!=
NULL
)
{
task
->
tk_xprt
=
NULL
;
xprt_put
(
xprt
);
}
}
static
void
rpc_task_set_client
(
struct
rpc_task
*
task
,
struct
rpc_clnt
*
clnt
)
{
if
(
clnt
!=
NULL
)
{
rpc_task_release_client
(
task
);
if
(
task
->
tk_xprt
==
NULL
)
task
->
tk_xprt
=
xprt_iter_get_next
(
&
clnt
->
cl_xpi
);
task
->
tk_client
=
clnt
;
atomic_inc
(
&
clnt
->
cl_count
);
if
(
clnt
->
cl_softrtry
)
...
...
@@ -2122,11 +2132,9 @@ call_timeout(struct rpc_task *task)
}
if
(
RPC_IS_SOFT
(
task
))
{
if
(
clnt
->
cl_chatty
)
{
rcu_read_lock
();
printk
(
KERN_NOTICE
"%s: server %s not responding, timed out
\n
"
,
clnt
->
cl_program
->
name
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
rcu_read_unlock
();
task
->
tk_xprt
->
servername
);
}
if
(
task
->
tk_flags
&
RPC_TASK_TIMEOUT
)
rpc_exit
(
task
,
-
ETIMEDOUT
);
...
...
@@ -2138,11 +2146,9 @@ call_timeout(struct rpc_task *task)
if
(
!
(
task
->
tk_flags
&
RPC_CALL_MAJORSEEN
))
{
task
->
tk_flags
|=
RPC_CALL_MAJORSEEN
;
if
(
clnt
->
cl_chatty
)
{
rcu_read_lock
();
printk
(
KERN_NOTICE
"%s: server %s not responding, still trying
\n
"
,
clnt
->
cl_program
->
name
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
rcu_read_unlock
();
task
->
tk_xprt
->
servername
);
}
}
rpc_force_rebind
(
clnt
);
...
...
@@ -2172,11 +2178,9 @@ call_decode(struct rpc_task *task)
if
(
task
->
tk_flags
&
RPC_CALL_MAJORSEEN
)
{
if
(
clnt
->
cl_chatty
)
{
rcu_read_lock
();
printk
(
KERN_NOTICE
"%s: server %s OK
\n
"
,
clnt
->
cl_program
->
name
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
rcu_read_unlock
();
task
->
tk_xprt
->
servername
);
}
task
->
tk_flags
&=
~
RPC_CALL_MAJORSEEN
;
}
...
...
@@ -2330,11 +2334,9 @@ rpc_verify_header(struct rpc_task *task)
task
->
tk_action
=
call_bind
;
goto
out_retry
;
case
RPC_AUTH_TOOWEAK
:
rcu_read_lock
();
printk
(
KERN_NOTICE
"RPC: server %s requires stronger "
"authentication.
\n
"
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
rcu_read_unlock
();
task
->
tk_xprt
->
servername
);
break
;
default:
dprintk
(
"RPC: %5u %s: unknown auth error: %x
\n
"
,
...
...
@@ -2359,27 +2361,27 @@ rpc_verify_header(struct rpc_task *task)
case
RPC_SUCCESS
:
return
p
;
case
RPC_PROG_UNAVAIL
:
dprintk
_rcu
(
"RPC: %5u %s: program %u is unsupported "
dprintk
(
"RPC: %5u %s: program %u is unsupported "
"by server %s
\n
"
,
task
->
tk_pid
,
__func__
,
(
unsigned
int
)
clnt
->
cl_prog
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
task
->
tk_xprt
->
servername
);
error
=
-
EPFNOSUPPORT
;
goto
out_err
;
case
RPC_PROG_MISMATCH
:
dprintk
_rcu
(
"RPC: %5u %s: program %u, version %u unsupported "
dprintk
(
"RPC: %5u %s: program %u, version %u unsupported "
"by server %s
\n
"
,
task
->
tk_pid
,
__func__
,
(
unsigned
int
)
clnt
->
cl_prog
,
(
unsigned
int
)
clnt
->
cl_vers
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
task
->
tk_xprt
->
servername
);
error
=
-
EPROTONOSUPPORT
;
goto
out_err
;
case
RPC_PROC_UNAVAIL
:
dprintk
_rcu
(
"RPC: %5u %s: proc %s unsupported by program %u, "
dprintk
(
"RPC: %5u %s: proc %s unsupported by program %u, "
"version %u on server %s
\n
"
,
task
->
tk_pid
,
__func__
,
rpc_proc_name
(
task
),
clnt
->
cl_prog
,
clnt
->
cl_vers
,
rcu_dereference
(
clnt
->
cl_xprt
)
->
servername
);
task
->
tk_xprt
->
servername
);
error
=
-
EOPNOTSUPP
;
goto
out_err
;
case
RPC_GARBAGE_ARGS
:
...
...
net/sunrpc/rpcb_clnt.c
浏览文件 @
fb43d172
...
...
@@ -683,11 +683,9 @@ void rpcb_getport_async(struct rpc_task *task)
int
status
;
rcu_read_lock
();
do
{
clnt
=
rpcb_find_transport_owner
(
task
->
tk_client
);
xprt
=
xprt_get
(
rcu_dereference
(
clnt
->
cl_xprt
));
}
while
(
xprt
==
NULL
);
clnt
=
rpcb_find_transport_owner
(
task
->
tk_client
);
rcu_read_unlock
();
xprt
=
xprt_get
(
task
->
tk_xprt
);
dprintk
(
"RPC: %5u %s(%s, %u, %u, %d)
\n
"
,
task
->
tk_pid
,
__func__
,
...
...
net/sunrpc/xprt.c
浏览文件 @
fb43d172
...
...
@@ -1181,7 +1181,7 @@ EXPORT_SYMBOL_GPL(xprt_free);
*/
void
xprt_reserve
(
struct
rpc_task
*
task
)
{
struct
rpc_xprt
*
xprt
;
struct
rpc_xprt
*
xprt
=
task
->
tk_
xprt
;
task
->
tk_status
=
0
;
if
(
task
->
tk_rqstp
!=
NULL
)
...
...
@@ -1189,11 +1189,8 @@ void xprt_reserve(struct rpc_task *task)
task
->
tk_timeout
=
0
;
task
->
tk_status
=
-
EAGAIN
;
rcu_read_lock
();
xprt
=
rcu_dereference
(
task
->
tk_client
->
cl_xprt
);
if
(
!
xprt_throttle_congested
(
xprt
,
task
))
xprt
->
ops
->
alloc_slot
(
xprt
,
task
);
rcu_read_unlock
();
}
/**
...
...
@@ -1207,7 +1204,7 @@ void xprt_reserve(struct rpc_task *task)
*/
void
xprt_retry_reserve
(
struct
rpc_task
*
task
)
{
struct
rpc_xprt
*
xprt
;
struct
rpc_xprt
*
xprt
=
task
->
tk_
xprt
;
task
->
tk_status
=
0
;
if
(
task
->
tk_rqstp
!=
NULL
)
...
...
@@ -1215,10 +1212,7 @@ void xprt_retry_reserve(struct rpc_task *task)
task
->
tk_timeout
=
0
;
task
->
tk_status
=
-
EAGAIN
;
rcu_read_lock
();
xprt
=
rcu_dereference
(
task
->
tk_client
->
cl_xprt
);
xprt
->
ops
->
alloc_slot
(
xprt
,
task
);
rcu_read_unlock
();
}
static
inline
__be32
xprt_alloc_xid
(
struct
rpc_xprt
*
xprt
)
...
...
@@ -1265,11 +1259,9 @@ void xprt_release(struct rpc_task *task)
if
(
req
==
NULL
)
{
if
(
task
->
tk_client
)
{
rcu_read_lock
();
xprt
=
rcu_dereference
(
task
->
tk_client
->
cl_xprt
);
xprt
=
task
->
tk_xprt
;
if
(
xprt
->
snd_task
==
task
)
xprt_release_write
(
xprt
,
task
);
rcu_read_unlock
();
}
return
;
}
...
...
net/sunrpc/xprtsock.c
浏览文件 @
fb43d172
...
...
@@ -1844,9 +1844,7 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock)
*/
static
void
xs_local_rpcbind
(
struct
rpc_task
*
task
)
{
rcu_read_lock
();
xprt_set_bound
(
rcu_dereference
(
task
->
tk_client
->
cl_xprt
));
rcu_read_unlock
();
xprt_set_bound
(
task
->
tk_xprt
);
}
static
void
xs_local_set_port
(
struct
rpc_xprt
*
xprt
,
unsigned
short
port
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录