Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
48c22eb2
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
48c22eb2
编写于
1月 17, 2012
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Move struct nfs_unique_id into struct nfs_seqid_counter
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
7ba127ab
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
12 deletion
+16
-12
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+6
-2
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+5
-5
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+5
-5
未找到文件。
fs/nfs/nfs4_fs.h
浏览文件 @
48c22eb2
...
...
@@ -53,8 +53,14 @@ struct nfs4_minor_version_ops {
const
struct
nfs4_state_maintenance_ops
*
state_renewal_ops
;
};
struct
nfs_unique_id
{
struct
rb_node
rb_node
;
__u64
id
;
};
#define NFS_SEQID_CONFIRMED 1
struct
nfs_seqid_counter
{
int
owner_id
;
int
flags
;
u32
counter
;
spinlock_t
lock
;
/* Protects the list */
...
...
@@ -91,7 +97,6 @@ struct nfs4_state_owner {
unsigned
long
so_flags
;
struct
list_head
so_states
;
struct
nfs_seqid_counter
so_seqid
;
int
so_owner_id
;
};
enum
{
...
...
@@ -131,7 +136,6 @@ struct nfs4_lock_state {
struct
nfs4_state
*
ls_state
;
/* Pointer to open state */
#define NFS_LOCK_INITIALIZED 1
int
ls_flags
;
int
ls_id
;
struct
nfs_seqid_counter
ls_seqid
;
nfs4_stateid
ls_stateid
;
atomic_t
ls_count
;
...
...
fs/nfs/nfs4proc.c
浏览文件 @
48c22eb2
...
...
@@ -822,7 +822,7 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry,
p
->
o_arg
.
open_flags
=
flags
;
p
->
o_arg
.
fmode
=
fmode
&
(
FMODE_READ
|
FMODE_WRITE
);
p
->
o_arg
.
clientid
=
server
->
nfs_client
->
cl_clientid
;
p
->
o_arg
.
id
=
sp
->
so_owner_id
;
p
->
o_arg
.
id
=
sp
->
so_
seqid
.
owner_id
;
p
->
o_arg
.
name
=
&
dentry
->
d_name
;
p
->
o_arg
.
server
=
server
;
p
->
o_arg
.
bitmask
=
server
->
attr_bitmask
;
...
...
@@ -1447,7 +1447,7 @@ static void nfs4_open_prepare(struct rpc_task *task, void *calldata)
rcu_read_unlock
();
}
/* Update sequence id. */
data
->
o_arg
.
id
=
sp
->
so_owner_id
;
data
->
o_arg
.
id
=
sp
->
so_
seqid
.
owner_id
;
data
->
o_arg
.
clientid
=
sp
->
so_server
->
nfs_client
->
cl_clientid
;
if
(
data
->
o_arg
.
claim
==
NFS4_OPEN_CLAIM_PREVIOUS
)
{
task
->
tk_msg
.
rpc_proc
=
&
nfs4_procedures
[
NFSPROC4_CLNT_OPEN_NOATTR
];
...
...
@@ -4032,7 +4032,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock
if
(
status
!=
0
)
goto
out
;
lsp
=
request
->
fl_u
.
nfs4_fl
.
owner
;
arg
.
lock_owner
.
id
=
lsp
->
ls_id
;
arg
.
lock_owner
.
id
=
lsp
->
ls_
seqid
.
owner_
id
;
arg
.
lock_owner
.
s_dev
=
server
->
s_dev
;
status
=
nfs4_call_sync
(
server
->
client
,
server
,
&
msg
,
&
arg
.
seq_args
,
&
res
.
seq_res
,
1
);
switch
(
status
)
{
...
...
@@ -4278,7 +4278,7 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
goto
out_free_seqid
;
p
->
arg
.
lock_stateid
=
&
lsp
->
ls_stateid
;
p
->
arg
.
lock_owner
.
clientid
=
server
->
nfs_client
->
cl_clientid
;
p
->
arg
.
lock_owner
.
id
=
lsp
->
ls_id
;
p
->
arg
.
lock_owner
.
id
=
lsp
->
ls_
seqid
.
owner_
id
;
p
->
arg
.
lock_owner
.
s_dev
=
server
->
s_dev
;
p
->
res
.
lock_seqid
=
p
->
arg
.
lock_seqid
;
p
->
lsp
=
lsp
;
...
...
@@ -4696,7 +4696,7 @@ void nfs4_release_lockowner(const struct nfs4_lock_state *lsp)
if
(
!
args
)
return
;
args
->
lock_owner
.
clientid
=
server
->
nfs_client
->
cl_clientid
;
args
->
lock_owner
.
id
=
lsp
->
ls_id
;
args
->
lock_owner
.
id
=
lsp
->
ls_
seqid
.
owner_
id
;
args
->
lock_owner
.
s_dev
=
server
->
s_dev
;
msg
.
rpc_argp
=
args
;
rpc_call_async
(
server
->
client
,
&
msg
,
0
,
&
nfs4_release_lockowner_ops
,
args
);
...
...
fs/nfs/nfs4state.c
浏览文件 @
48c22eb2
...
...
@@ -366,7 +366,7 @@ nfs4_insert_state_owner_locked(struct nfs4_state_owner *new)
return
sp
;
}
}
err
=
ida_get_new
(
&
server
->
openowner_id
,
&
new
->
so_owner_id
);
err
=
ida_get_new
(
&
server
->
openowner_id
,
&
new
->
so_
seqid
.
owner_id
);
if
(
err
)
return
ERR_PTR
(
err
);
rb_link_node
(
&
new
->
so_server_node
,
parent
,
p
);
...
...
@@ -381,7 +381,7 @@ nfs4_remove_state_owner_locked(struct nfs4_state_owner *sp)
if
(
!
RB_EMPTY_NODE
(
&
sp
->
so_server_node
))
rb_erase
(
&
sp
->
so_server_node
,
&
server
->
state_owners
);
ida_remove
(
&
server
->
openowner_id
,
sp
->
so_owner_id
);
ida_remove
(
&
server
->
openowner_id
,
sp
->
so_
seqid
.
owner_id
);
}
static
void
...
...
@@ -775,8 +775,8 @@ static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, f
default:
goto
out_free
;
}
lsp
->
ls_id
=
ida_simple_get
(
&
server
->
lockowner_id
,
0
,
0
,
GFP_NOFS
);
if
(
lsp
->
ls_id
<
0
)
lsp
->
ls_
seqid
.
owner_
id
=
ida_simple_get
(
&
server
->
lockowner_id
,
0
,
0
,
GFP_NOFS
);
if
(
lsp
->
ls_
seqid
.
owner_
id
<
0
)
goto
out_free
;
INIT_LIST_HEAD
(
&
lsp
->
ls_locks
);
return
lsp
;
...
...
@@ -789,7 +789,7 @@ static void nfs4_free_lock_state(struct nfs4_lock_state *lsp)
{
struct
nfs_server
*
server
=
lsp
->
ls_state
->
owner
->
so_server
;
ida_simple_remove
(
&
server
->
lockowner_id
,
lsp
->
ls_id
);
ida_simple_remove
(
&
server
->
lockowner_id
,
lsp
->
ls_
seqid
.
owner_
id
);
nfs4_destroy_seqid_counter
(
&
lsp
->
ls_seqid
);
kfree
(
lsp
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录