Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fb8a1f11
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fb8a1f11
编写于
3月 11, 2009
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: cleanup - remove struct nfs_inode->ncommit
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
a65318bf
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
12 deletion
+17
-12
fs/nfs/inode.c
fs/nfs/inode.c
+0
-1
fs/nfs/write.c
fs/nfs/write.c
+16
-9
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-2
未找到文件。
fs/nfs/inode.c
浏览文件 @
fb8a1f11
...
@@ -1345,7 +1345,6 @@ static void init_once(void *foo)
...
@@ -1345,7 +1345,6 @@ static void init_once(void *foo)
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_entry_lru
);
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_entry_lru
);
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_inode_lru
);
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_inode_lru
);
INIT_RADIX_TREE
(
&
nfsi
->
nfs_page_tree
,
GFP_ATOMIC
);
INIT_RADIX_TREE
(
&
nfsi
->
nfs_page_tree
,
GFP_ATOMIC
);
nfsi
->
ncommit
=
0
;
nfsi
->
npages
=
0
;
nfsi
->
npages
=
0
;
atomic_set
(
&
nfsi
->
silly_count
,
1
);
atomic_set
(
&
nfsi
->
silly_count
,
1
);
INIT_HLIST_HEAD
(
&
nfsi
->
silly_list
);
INIT_HLIST_HEAD
(
&
nfsi
->
silly_list
);
...
...
fs/nfs/write.c
浏览文件 @
fb8a1f11
...
@@ -404,7 +404,6 @@ nfs_mark_request_commit(struct nfs_page *req)
...
@@ -404,7 +404,6 @@ nfs_mark_request_commit(struct nfs_page *req)
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
spin_lock
(
&
inode
->
i_lock
);
spin_lock
(
&
inode
->
i_lock
);
nfsi
->
ncommit
++
;
set_bit
(
PG_CLEAN
,
&
(
req
)
->
wb_flags
);
set_bit
(
PG_CLEAN
,
&
(
req
)
->
wb_flags
);
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
req
->
wb_index
,
...
@@ -523,6 +522,12 @@ static void nfs_cancel_commit_list(struct list_head *head)
...
@@ -523,6 +522,12 @@ static void nfs_cancel_commit_list(struct list_head *head)
}
}
}
}
static
int
nfs_need_commit
(
struct
nfs_inode
*
nfsi
)
{
return
radix_tree_tagged
(
&
nfsi
->
nfs_page_tree
,
NFS_PAGE_TAG_COMMIT
);
}
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
/*
/*
* nfs_scan_commit - Scan an inode for commit requests
* nfs_scan_commit - Scan an inode for commit requests
...
@@ -538,16 +543,18 @@ static int
...
@@ -538,16 +543,18 @@ static int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
int
res
=
0
;
if
(
nfsi
->
ncommit
!=
0
)
{
if
(
!
nfs_need_commit
(
nfsi
))
res
=
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
return
0
;
NFS_PAGE_TAG_COMMIT
);
nfsi
->
ncommit
-=
res
;
return
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
NFS_PAGE_TAG_COMMIT
);
}
return
res
;
}
}
#else
#else
static
inline
int
nfs_need_commit
(
struct
nfs_inode
*
nfsi
)
{
return
0
;
}
static
inline
int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
static
inline
int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
{
return
0
;
return
0
;
...
@@ -820,7 +827,7 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
...
@@ -820,7 +827,7 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
data
->
args
.
stable
=
NFS_UNSTABLE
;
data
->
args
.
stable
=
NFS_UNSTABLE
;
if
(
how
&
FLUSH_STABLE
)
{
if
(
how
&
FLUSH_STABLE
)
{
data
->
args
.
stable
=
NFS_DATA_SYNC
;
data
->
args
.
stable
=
NFS_DATA_SYNC
;
if
(
!
NFS_I
(
inode
)
->
ncommit
)
if
(
!
nfs_need_commit
(
NFS_I
(
inode
))
)
data
->
args
.
stable
=
NFS_FILE_SYNC
;
data
->
args
.
stable
=
NFS_FILE_SYNC
;
}
}
...
...
include/linux/nfs_fs.h
浏览文件 @
fb8a1f11
...
@@ -166,8 +166,7 @@ struct nfs_inode {
...
@@ -166,8 +166,7 @@ struct nfs_inode {
*/
*/
struct
radix_tree_root
nfs_page_tree
;
struct
radix_tree_root
nfs_page_tree
;
unsigned
long
ncommit
,
unsigned
long
npages
;
npages
;
/* Open contexts for shared mmap writes */
/* Open contexts for shared mmap writes */
struct
list_head
open_files
;
struct
list_head
open_files
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录