Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
ca52fec1
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看板
提交
ca52fec1
编写于
4月 17, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Use pgoff_t in structures and functions that pass page cache offsets
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
724c439c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
13 deletion
+13
-13
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+2
-2
fs/nfs/write.c
fs/nfs/write.c
+9
-9
include/linux/nfs_page.h
include/linux/nfs_page.h
+2
-2
未找到文件。
fs/nfs/pagelist.c
浏览文件 @
ca52fec1
...
...
@@ -383,12 +383,12 @@ void nfs_pageio_complete(struct nfs_pageio_descriptor *desc)
* You must be holding the inode's req_lock when calling this function
*/
int
nfs_scan_list
(
struct
nfs_inode
*
nfsi
,
struct
list_head
*
head
,
struct
list_head
*
dst
,
unsigned
long
idx_start
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
struct
nfs_page
*
pgvec
[
NFS_SCAN_MAXENTRIES
];
struct
nfs_page
*
req
;
unsigned
long
idx_end
;
pgoff_t
idx_end
;
int
found
,
i
;
int
res
;
...
...
fs/nfs/write.c
浏览文件 @
ca52fec1
...
...
@@ -139,7 +139,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c
{
struct
inode
*
inode
=
page
->
mapping
->
host
;
loff_t
end
,
i_size
=
i_size_read
(
inode
);
unsigned
long
end_index
=
(
i_size
-
1
)
>>
PAGE_CACHE_SHIFT
;
pgoff_t
end_index
=
(
i_size
-
1
)
>>
PAGE_CACHE_SHIFT
;
if
(
i_size
>
0
&&
page
->
index
<
end_index
)
return
;
...
...
@@ -511,11 +511,11 @@ int nfs_reschedule_unstable_write(struct nfs_page *req)
*
* Interruptible by signals only if mounted with intr flag.
*/
static
int
nfs_wait_on_requests_locked
(
struct
inode
*
inode
,
unsigned
long
idx_start
,
unsigned
int
npages
)
static
int
nfs_wait_on_requests_locked
(
struct
inode
*
inode
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
struct
nfs_page
*
req
;
unsigned
long
idx_end
,
next
;
pgoff_t
idx_end
,
next
;
unsigned
int
res
=
0
;
int
error
;
...
...
@@ -570,7 +570,7 @@ static void nfs_cancel_commit_list(struct list_head *head)
* The requests are *not* checked to ensure that they form a contiguous set.
*/
static
int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
unsigned
long
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
);
int
res
=
0
;
...
...
@@ -584,7 +584,7 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, unsigned long idx_st
return
res
;
}
#else
static
inline
int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
unsigned
long
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
;
}
...
...
@@ -604,7 +604,7 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
struct
inode
*
inode
=
mapping
->
host
;
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
struct
nfs_page
*
req
,
*
new
=
NULL
;
unsigned
long
rqend
,
end
;
pgoff_t
rqend
,
end
;
end
=
offset
+
bytes
;
...
...
@@ -1292,7 +1292,7 @@ long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_contr
{
struct
inode
*
inode
=
mapping
->
host
;
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
unsigned
long
idx_start
,
idx_end
;
pgoff_t
idx_start
,
idx_end
;
unsigned
int
npages
=
0
;
LIST_HEAD
(
head
);
int
nocommit
=
how
&
FLUSH_NOCOMMIT
;
...
...
@@ -1305,10 +1305,10 @@ long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_contr
idx_start
=
wbc
->
range_start
>>
PAGE_CACHE_SHIFT
;
idx_end
=
wbc
->
range_end
>>
PAGE_CACHE_SHIFT
;
if
(
idx_end
>
idx_start
)
{
unsigned
long
l_npages
=
1
+
idx_end
-
idx_start
;
pgoff_t
l_npages
=
1
+
idx_end
-
idx_start
;
npages
=
l_npages
;
if
(
sizeof
(
npages
)
!=
sizeof
(
l_npages
)
&&
(
unsigned
long
)
npages
!=
l_npages
)
(
pgoff_t
)
npages
!=
l_npages
)
npages
=
0
;
}
}
...
...
include/linux/nfs_page.h
浏览文件 @
ca52fec1
...
...
@@ -38,7 +38,7 @@ struct nfs_page {
struct
page
*
wb_page
;
/* page to read in/write out */
struct
nfs_open_context
*
wb_context
;
/* File state context info */
atomic_t
wb_complete
;
/* i/os we're waiting for */
unsigned
long
wb_index
;
/* Offset >> PAGE_CACHE_SHIFT */
pgoff_t
wb_index
;
/* Offset >> PAGE_CACHE_SHIFT */
unsigned
int
wb_offset
,
/* Offset & ~PAGE_CACHE_MASK */
wb_pgbase
,
/* Start of page data */
wb_bytes
;
/* Length of request */
...
...
@@ -72,7 +72,7 @@ extern void nfs_release_request(struct nfs_page *req);
extern
int
nfs_scan_list
(
struct
nfs_inode
*
nfsi
,
struct
list_head
*
head
,
struct
list_head
*
dst
,
unsigned
long
idx_start
,
unsigned
int
npages
);
pgoff_t
idx_start
,
unsigned
int
npages
);
extern
void
nfs_pageio_init
(
struct
nfs_pageio_descriptor
*
desc
,
struct
inode
*
inode
,
int
(
*
doio
)(
struct
inode
*
,
struct
list_head
*
,
unsigned
int
,
size_t
,
int
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录