Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9fd367f0
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看板
提交
9fd367f0
编写于
6月 17, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS cleanup: Rename NFS_PAGE_TAG_WRITEBACK to NFS_PAGE_TAG_LOCKED
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
c03b4024
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
18 deletion
+17
-18
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+7
-7
fs/nfs/write.c
fs/nfs/write.c
+8
-8
include/linux/nfs_page.h
include/linux/nfs_page.h
+2
-3
未找到文件。
fs/nfs/pagelist.c
浏览文件 @
9fd367f0
...
...
@@ -108,29 +108,29 @@ void nfs_unlock_request(struct nfs_page *req)
}
/**
* nfs_set_page_
writeback_locked - Lock a request for writeback
* nfs_set_page_
tag_locked - Tag a request as locked
* @req:
*/
int
nfs_set_page_writeback
_locked
(
struct
nfs_page
*
req
)
static
int
nfs_set_page_tag
_locked
(
struct
nfs_page
*
req
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
path
.
dentry
->
d_inode
);
if
(
!
nfs_lock_request
(
req
))
return
0
;
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_
WRITEBACK
);
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_
LOCKED
);
return
1
;
}
/**
* nfs_clear_page_
writeback - Unlock request
and wake up sleepers
* nfs_clear_page_
tag_locked - Clear request tag
and wake up sleepers
*/
void
nfs_clear_page_
writeback
(
struct
nfs_page
*
req
)
void
nfs_clear_page_
tag_locked
(
struct
nfs_page
*
req
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
path
.
dentry
->
d_inode
);
if
(
req
->
wb_page
!=
NULL
)
{
spin_lock
(
&
nfsi
->
req_lock
);
radix_tree_tag_clear
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_
WRITEBACK
);
radix_tree_tag_clear
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_
LOCKED
);
spin_unlock
(
&
nfsi
->
req_lock
);
}
nfs_unlock_request
(
req
);
...
...
@@ -421,7 +421,7 @@ int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head,
idx_start
=
req
->
wb_index
+
1
;
if
(
req
->
wb_list_head
!=
head
)
continue
;
if
(
nfs_set_page_
writeback
_locked
(
req
))
{
if
(
nfs_set_page_
tag
_locked
(
req
))
{
nfs_list_remove_request
(
req
);
nfs_list_add_request
(
req
,
dst
);
res
++
;
...
...
fs/nfs/write.c
浏览文件 @
9fd367f0
...
...
@@ -289,7 +289,7 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
BUG
();
}
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_
WRITEBACK
);
NFS_PAGE_TAG_
LOCKED
);
ret
=
test_bit
(
PG_NEED_FLUSH
,
&
req
->
wb_flags
);
spin_unlock
(
req_lock
);
nfs_pageio_add_request
(
pgio
,
req
);
...
...
@@ -524,7 +524,7 @@ static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, u
idx_end
=
idx_start
+
npages
-
1
;
next
=
idx_start
;
while
(
radix_tree_gang_lookup_tag
(
&
nfsi
->
nfs_page_tree
,
(
void
**
)
&
req
,
next
,
1
,
NFS_PAGE_TAG_
WRITEBACK
))
{
while
(
radix_tree_gang_lookup_tag
(
&
nfsi
->
nfs_page_tree
,
(
void
**
)
&
req
,
next
,
1
,
NFS_PAGE_TAG_
LOCKED
))
{
if
(
req
->
wb_index
>
idx_end
)
break
;
...
...
@@ -759,7 +759,7 @@ static void nfs_writepage_release(struct nfs_page *req)
nfs_inode_remove_request
(
req
);
}
else
nfs_end_page_writeback
(
req
->
wb_page
);
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
}
static
inline
int
flush_task_priority
(
int
how
)
...
...
@@ -888,7 +888,7 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, unsigned
}
nfs_redirty_request
(
req
);
nfs_end_page_writeback
(
req
->
wb_page
);
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
return
-
ENOMEM
;
}
...
...
@@ -931,7 +931,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i
nfs_list_remove_request
(
req
);
nfs_redirty_request
(
req
);
nfs_end_page_writeback
(
req
->
wb_page
);
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
}
return
-
ENOMEM
;
}
...
...
@@ -1049,7 +1049,7 @@ static void nfs_writeback_done_full(struct rpc_task *task, void *calldata)
nfs_end_page_writeback
(
page
);
nfs_inode_remove_request
(
req
);
next:
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
}
}
...
...
@@ -1212,7 +1212,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
nfs_list_remove_request
(
req
);
nfs_mark_request_commit
(
req
);
dec_zone_page_state
(
req
->
wb_page
,
NR_UNSTABLE_NFS
);
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
}
return
-
ENOMEM
;
}
...
...
@@ -1265,7 +1265,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
dprintk
(
" mismatch
\n
"
);
nfs_redirty_request
(
req
);
next:
nfs_clear_page_
writeback
(
req
);
nfs_clear_page_
tag_locked
(
req
);
}
}
...
...
include/linux/nfs_page.h
浏览文件 @
9fd367f0
...
...
@@ -21,7 +21,7 @@
/*
* Valid flags for the radix tree
*/
#define NFS_PAGE_TAG_
WRITEBACK
0
#define NFS_PAGE_TAG_
LOCKED
0
/*
* Valid flags for a dirty buffer
...
...
@@ -84,8 +84,7 @@ extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
extern
void
nfs_pageio_cond_complete
(
struct
nfs_pageio_descriptor
*
,
pgoff_t
);
extern
int
nfs_wait_on_request
(
struct
nfs_page
*
);
extern
void
nfs_unlock_request
(
struct
nfs_page
*
req
);
extern
int
nfs_set_page_writeback_locked
(
struct
nfs_page
*
req
);
extern
void
nfs_clear_page_writeback
(
struct
nfs_page
*
req
);
extern
void
nfs_clear_page_tag_locked
(
struct
nfs_page
*
req
);
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录