Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
188fef11
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
188fef11
编写于
6月 16, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: Move rpc_register_client and friends into net/sunrpc/clnt.c
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
f61534df
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
57 addition
and
64 deletion
+57
-64
include/linux/sunrpc/clnt.h
include/linux/sunrpc/clnt.h
+0
-2
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+57
-0
net/sunrpc/sched.c
net/sunrpc/sched.c
+0
-62
未找到文件。
include/linux/sunrpc/clnt.h
浏览文件 @
188fef11
...
...
@@ -120,8 +120,6 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
struct
rpc_clnt
*
rpc_clone_client
(
struct
rpc_clnt
*
);
void
rpc_shutdown_client
(
struct
rpc_clnt
*
);
void
rpc_release_client
(
struct
rpc_clnt
*
);
void
rpc_register_client
(
struct
rpc_clnt
*
);
void
rpc_unregister_client
(
struct
rpc_clnt
*
);
int
rpcb_register
(
u32
,
u32
,
int
,
unsigned
short
,
int
*
);
void
rpcb_getport
(
struct
rpc_task
*
);
...
...
net/sunrpc/clnt.c
浏览文件 @
188fef11
...
...
@@ -44,6 +44,12 @@
dprintk("RPC: %5u %s (status %d)\n", t->tk_pid, \
__FUNCTION__, t->tk_status)
/*
* All RPC clients are linked into this list
*/
static
LIST_HEAD
(
all_clients
);
static
DEFINE_SPINLOCK
(
rpc_client_lock
);
static
DECLARE_WAIT_QUEUE_HEAD
(
destroy_wait
);
...
...
@@ -66,6 +72,19 @@ static void call_connect_status(struct rpc_task *task);
static
__be32
*
call_header
(
struct
rpc_task
*
task
);
static
__be32
*
call_verify
(
struct
rpc_task
*
task
);
static
void
rpc_register_client
(
struct
rpc_clnt
*
clnt
)
{
spin_lock
(
&
rpc_client_lock
);
list_add
(
&
clnt
->
cl_clients
,
&
all_clients
);
spin_unlock
(
&
rpc_client_lock
);
}
static
void
rpc_unregister_client
(
struct
rpc_clnt
*
clnt
)
{
spin_lock
(
&
rpc_client_lock
);
list_del
(
&
clnt
->
cl_clients
);
spin_unlock
(
&
rpc_client_lock
);
}
static
int
rpc_setup_pipedir
(
struct
rpc_clnt
*
clnt
,
char
*
dir_name
)
...
...
@@ -1410,3 +1429,41 @@ int rpc_ping(struct rpc_clnt *clnt, int flags)
put_rpccred
(
msg
.
rpc_cred
);
return
err
;
}
#ifdef RPC_DEBUG
void
rpc_show_tasks
(
void
)
{
struct
rpc_clnt
*
clnt
;
struct
rpc_task
*
t
;
spin_lock
(
&
rpc_client_lock
);
if
(
list_empty
(
&
all_clients
))
goto
out
;
printk
(
"-pid- proc flgs status -client- -prog- --rqstp- -timeout "
"-rpcwait -action- ---ops--
\n
"
);
list_for_each_entry
(
clnt
,
&
all_clients
,
cl_clients
)
{
if
(
list_empty
(
&
clnt
->
cl_tasks
))
continue
;
spin_lock
(
&
clnt
->
cl_lock
);
list_for_each_entry
(
t
,
&
clnt
->
cl_tasks
,
tk_task
)
{
const
char
*
rpc_waitq
=
"none"
;
if
(
RPC_IS_QUEUED
(
t
))
rpc_waitq
=
rpc_qname
(
t
->
u
.
tk_wait
.
rpc_waitq
);
printk
(
"%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p
\n
"
,
t
->
tk_pid
,
(
t
->
tk_msg
.
rpc_proc
?
t
->
tk_msg
.
rpc_proc
->
p_proc
:
-
1
),
t
->
tk_flags
,
t
->
tk_status
,
t
->
tk_client
,
(
t
->
tk_client
?
t
->
tk_client
->
cl_prog
:
0
),
t
->
tk_rqstp
,
t
->
tk_timeout
,
rpc_waitq
,
t
->
tk_action
,
t
->
tk_ops
);
}
spin_unlock
(
&
clnt
->
cl_lock
);
}
out:
spin_unlock
(
&
rpc_client_lock
);
}
#endif
net/sunrpc/sched.c
浏览文件 @
188fef11
...
...
@@ -47,11 +47,6 @@ static void rpc_release_task(struct rpc_task *task);
*/
static
RPC_WAITQ
(
delay_queue
,
"delayq"
);
/*
* All RPC clients are linked into this list
*/
static
LIST_HEAD
(
all_clients
);
/*
* rpciod-related stuff
*/
...
...
@@ -59,11 +54,6 @@ static DEFINE_MUTEX(rpciod_mutex);
static
atomic_t
rpciod_users
=
ATOMIC_INIT
(
0
);
struct
workqueue_struct
*
rpciod_workqueue
;
/*
* Spinlock for other critical sections of code.
*/
static
DEFINE_SPINLOCK
(
rpc_sched_lock
);
/*
* Disable the timer for a given RPC task. Should be called with
* queue->lock and bh_disabled in order to avoid races within
...
...
@@ -994,20 +984,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
spin_unlock
(
&
clnt
->
cl_lock
);
}
void
rpc_register_client
(
struct
rpc_clnt
*
clnt
)
{
spin_lock
(
&
rpc_sched_lock
);
list_add
(
&
clnt
->
cl_clients
,
&
all_clients
);
spin_unlock
(
&
rpc_sched_lock
);
}
void
rpc_unregister_client
(
struct
rpc_clnt
*
clnt
)
{
spin_lock
(
&
rpc_sched_lock
);
list_del
(
&
clnt
->
cl_clients
);
spin_unlock
(
&
rpc_sched_lock
);
}
/*
* Start up the rpciod process if it's not already running.
*/
...
...
@@ -1059,44 +1035,6 @@ rpciod_down(void)
mutex_unlock
(
&
rpciod_mutex
);
}
#ifdef RPC_DEBUG
void
rpc_show_tasks
(
void
)
{
struct
rpc_clnt
*
clnt
;
struct
rpc_task
*
t
;
spin_lock
(
&
rpc_sched_lock
);
if
(
list_empty
(
&
all_clients
))
goto
out
;
printk
(
"-pid- proc flgs status -client- -prog- --rqstp- -timeout "
"-rpcwait -action- ---ops--
\n
"
);
list_for_each_entry
(
clnt
,
&
all_clients
,
cl_clients
)
{
if
(
list_empty
(
&
clnt
->
cl_tasks
))
continue
;
spin_lock
(
&
clnt
->
cl_lock
);
list_for_each_entry
(
t
,
&
clnt
->
cl_tasks
,
tk_task
)
{
const
char
*
rpc_waitq
=
"none"
;
if
(
RPC_IS_QUEUED
(
t
))
rpc_waitq
=
rpc_qname
(
t
->
u
.
tk_wait
.
rpc_waitq
);
printk
(
"%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p
\n
"
,
t
->
tk_pid
,
(
t
->
tk_msg
.
rpc_proc
?
t
->
tk_msg
.
rpc_proc
->
p_proc
:
-
1
),
t
->
tk_flags
,
t
->
tk_status
,
t
->
tk_client
,
(
t
->
tk_client
?
t
->
tk_client
->
cl_prog
:
0
),
t
->
tk_rqstp
,
t
->
tk_timeout
,
rpc_waitq
,
t
->
tk_action
,
t
->
tk_ops
);
}
spin_unlock
(
&
clnt
->
cl_lock
);
}
out:
spin_unlock
(
&
rpc_sched_lock
);
}
#endif
void
rpc_destroy_mempool
(
void
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录