Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
2aefa104
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 大约 4 年
通知
14
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2aefa104
编写于
6月 17, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Remove the redundant 'dirty' and 'commit' lists from nfs_inode
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
5c369683
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
14 deletion
+2
-14
fs/nfs/inode.c
fs/nfs/inode.c
+0
-3
fs/nfs/write.c
fs/nfs/write.c
+0
-3
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-4
include/linux/nfs_page.h
include/linux/nfs_page.h
+1
-4
未找到文件。
fs/nfs/inode.c
浏览文件 @
2aefa104
...
@@ -1149,14 +1149,11 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
...
@@ -1149,14 +1149,11 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
inode_init_once
(
&
nfsi
->
vfs_inode
);
inode_init_once
(
&
nfsi
->
vfs_inode
);
spin_lock_init
(
&
nfsi
->
req_lock
);
spin_lock_init
(
&
nfsi
->
req_lock
);
INIT_LIST_HEAD
(
&
nfsi
->
dirty
);
INIT_LIST_HEAD
(
&
nfsi
->
commit
);
INIT_LIST_HEAD
(
&
nfsi
->
open_files
);
INIT_LIST_HEAD
(
&
nfsi
->
open_files
);
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
);
atomic_set
(
&
nfsi
->
data_updates
,
0
);
atomic_set
(
&
nfsi
->
data_updates
,
0
);
nfsi
->
ndirty
=
0
;
nfsi
->
ncommit
=
0
;
nfsi
->
ncommit
=
0
;
nfsi
->
npages
=
0
;
nfsi
->
npages
=
0
;
nfs4_init_once
(
nfsi
);
nfs4_init_once
(
nfsi
);
...
...
fs/nfs/write.c
浏览文件 @
2aefa104
...
@@ -459,7 +459,6 @@ nfs_mark_request_commit(struct nfs_page *req)
...
@@ -459,7 +459,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
(
&
nfsi
->
req_lock
);
spin_lock
(
&
nfsi
->
req_lock
);
nfs_list_add_request
(
req
,
&
nfsi
->
commit
);
nfsi
->
ncommit
++
;
nfsi
->
ncommit
++
;
set_bit
(
PG_NEED_COMMIT
,
&
(
req
)
->
wb_flags
);
set_bit
(
PG_NEED_COMMIT
,
&
(
req
)
->
wb_flags
);
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
...
@@ -581,8 +580,6 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u
...
@@ -581,8 +580,6 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u
res
=
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
res
=
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
NFS_PAGE_TAG_COMMIT
);
NFS_PAGE_TAG_COMMIT
);
nfsi
->
ncommit
-=
res
;
nfsi
->
ncommit
-=
res
;
if
((
nfsi
->
ncommit
==
0
)
!=
list_empty
(
&
nfsi
->
commit
))
printk
(
KERN_ERR
"NFS: desynchronized value of nfs_i.ncommit.
\n
"
);
}
}
return
res
;
return
res
;
}
}
...
...
include/linux/nfs_fs.h
浏览文件 @
2aefa104
...
@@ -156,12 +156,9 @@ struct nfs_inode {
...
@@ -156,12 +156,9 @@ struct nfs_inode {
* This is the list of dirty unwritten pages.
* This is the list of dirty unwritten pages.
*/
*/
spinlock_t
req_lock
;
spinlock_t
req_lock
;
struct
list_head
dirty
;
struct
list_head
commit
;
struct
radix_tree_root
nfs_page_tree
;
struct
radix_tree_root
nfs_page_tree
;
unsigned
int
ndirty
,
unsigned
int
ncommit
,
ncommit
,
npages
;
npages
;
/* Open contexts for shared mmap writes */
/* Open contexts for shared mmap writes */
...
...
include/linux/nfs_page.h
浏览文件 @
2aefa104
...
@@ -34,8 +34,7 @@
...
@@ -34,8 +34,7 @@
struct
nfs_inode
;
struct
nfs_inode
;
struct
nfs_page
{
struct
nfs_page
{
struct
list_head
wb_list
,
/* Defines state of page: */
struct
list_head
wb_list
;
/* Defines state of page: */
*
wb_list_head
;
/* read/write/commit */
struct
page
*
wb_page
;
/* page to read in/write out */
struct
page
*
wb_page
;
/* page to read in/write out */
struct
nfs_open_context
*
wb_context
;
/* File state context info */
struct
nfs_open_context
*
wb_context
;
/* File state context info */
atomic_t
wb_complete
;
/* i/os we're waiting for */
atomic_t
wb_complete
;
/* i/os we're waiting for */
...
@@ -118,7 +117,6 @@ static inline void
...
@@ -118,7 +117,6 @@ static inline void
nfs_list_add_request
(
struct
nfs_page
*
req
,
struct
list_head
*
head
)
nfs_list_add_request
(
struct
nfs_page
*
req
,
struct
list_head
*
head
)
{
{
list_add_tail
(
&
req
->
wb_list
,
head
);
list_add_tail
(
&
req
->
wb_list
,
head
);
req
->
wb_list_head
=
head
;
}
}
...
@@ -132,7 +130,6 @@ nfs_list_remove_request(struct nfs_page *req)
...
@@ -132,7 +130,6 @@ nfs_list_remove_request(struct nfs_page *req)
if
(
list_empty
(
&
req
->
wb_list
))
if
(
list_empty
(
&
req
->
wb_list
))
return
;
return
;
list_del_init
(
&
req
->
wb_list
);
list_del_init
(
&
req
->
wb_list
);
req
->
wb_list_head
=
NULL
;
}
}
static
inline
struct
nfs_page
*
static
inline
struct
nfs_page
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录