Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
b1330031
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b1330031
编写于
9月 04, 2007
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for_linus' of
git://git.linux-nfs.org/pub/linux/nfs-2.6
上级
ea3c4b12
1b3b4a1a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
59 addition
and
14 deletion
+59
-14
fs/nfs/file.c
fs/nfs/file.c
+1
-1
fs/nfs/namespace.c
fs/nfs/namespace.c
+1
-1
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+2
-2
fs/nfs/super.c
fs/nfs/super.c
+10
-10
fs/nfs/write.c
fs/nfs/write.c
+44
-0
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-0
未找到文件。
fs/nfs/file.c
浏览文件 @
b1330031
...
...
@@ -316,7 +316,7 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
if
(
offset
!=
0
)
return
;
/* Cancel any unstarted writes on this page */
nfs_wb_page_
priority
(
page
->
mapping
->
host
,
page
,
FLUSH_INVALIDATE
);
nfs_wb_page_
cancel
(
page
->
mapping
->
host
,
page
);
}
static
int
nfs_release_page
(
struct
page
*
page
,
gfp_t
gfp
)
...
...
fs/nfs/namespace.c
浏览文件 @
b1330031
...
...
@@ -176,7 +176,7 @@ static void nfs_expire_automounts(struct work_struct *work)
void
nfs_release_automount_timer
(
void
)
{
if
(
list_empty
(
&
nfs_automount_list
))
cancel_delayed_work
_sync
(
&
nfs_automount_task
);
cancel_delayed_work
(
&
nfs_automount_task
);
}
/*
...
...
fs/nfs/nfs4proc.c
浏览文件 @
b1330031
...
...
@@ -646,7 +646,7 @@ static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state
rcu_read_lock
();
delegation
=
rcu_dereference
(
NFS_I
(
state
->
inode
)
->
delegation
);
if
(
delegation
!=
NULL
&&
(
delegation
->
flags
&
NFS_DELEGATION_NEED_RECLAIM
)
!=
0
)
delegation_type
=
delegation
->
flags
;
delegation_type
=
delegation
->
type
;
rcu_read_unlock
();
opendata
->
o_arg
.
u
.
delegation_type
=
delegation_type
;
status
=
nfs4_open_recover
(
opendata
,
state
);
...
...
@@ -1434,7 +1434,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
}
res
=
d_add_unique
(
dentry
,
igrab
(
state
->
inode
));
if
(
res
!=
NULL
)
dentry
=
res
;
path
.
dentry
=
res
;
nfs4_intent_set_file
(
nd
,
&
path
,
state
);
return
res
;
}
...
...
fs/nfs/super.c
浏览文件 @
b1330031
...
...
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
kfree
(
string
);
switch
(
token
)
{
case
Opt_udp
:
case
Opt_
xprt_
udp
:
mnt
->
flags
&=
~
NFS_MOUNT_TCP
;
mnt
->
nfs_server
.
protocol
=
IPPROTO_UDP
;
mnt
->
timeo
=
7
;
mnt
->
retrans
=
5
;
break
;
case
Opt_tcp
:
case
Opt_
xprt_
tcp
:
mnt
->
flags
|=
NFS_MOUNT_TCP
;
mnt
->
nfs_server
.
protocol
=
IPPROTO_TCP
;
mnt
->
timeo
=
600
;
...
...
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
kfree
(
string
);
switch
(
token
)
{
case
Opt_udp
:
case
Opt_
xprt_
udp
:
mnt
->
mount_server
.
protocol
=
IPPROTO_UDP
;
break
;
case
Opt_tcp
:
case
Opt_
xprt_
tcp
:
mnt
->
mount_server
.
protocol
=
IPPROTO_TCP
;
break
;
default:
...
...
@@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
c
=
strchr
(
dev_name
,
':'
);
if
(
c
==
NULL
)
return
-
EINVAL
;
len
=
c
-
dev_name
-
1
;
len
=
c
-
dev_name
;
if
(
len
>
sizeof
(
data
->
hostname
))
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
strncpy
(
data
->
hostname
,
dev_name
,
len
);
args
.
nfs_server
.
hostname
=
data
->
hostname
;
c
++
;
if
(
strlen
(
c
)
>
NFS_MAXPATHLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
args
.
nfs_server
.
export_path
=
c
;
status
=
nfs_try_mount
(
&
args
,
mntfh
);
if
(
status
)
return
-
EINVAL
;
return
status
;
/*
* Translate to nfs_mount_data, which nfs_fill_super
...
...
@@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
/* while calculating len, pretend ':' is '\0' */
len
=
c
-
dev_name
;
if
(
len
>
NFS4_MAXNAMLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
*
hostname
=
kzalloc
(
len
,
GFP_KERNEL
);
if
(
*
hostname
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
c
++
;
/* step over the ':' */
len
=
strlen
(
c
);
if
(
len
>
NFS4_MAXPATHLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
*
mntpath
=
kzalloc
(
len
+
1
,
GFP_KERNEL
);
if
(
*
mntpath
==
NULL
)
return
-
ENOMEM
;
...
...
fs/nfs/write.c
浏览文件 @
b1330031
...
...
@@ -1396,6 +1396,50 @@ int nfs_sync_mapping_range(struct address_space *mapping, loff_t range_start, lo
return
ret
;
}
int
nfs_wb_page_cancel
(
struct
inode
*
inode
,
struct
page
*
page
)
{
struct
nfs_page
*
req
;
loff_t
range_start
=
page_offset
(
page
);
loff_t
range_end
=
range_start
+
(
loff_t
)(
PAGE_CACHE_SIZE
-
1
);
struct
writeback_control
wbc
=
{
.
bdi
=
page
->
mapping
->
backing_dev_info
,
.
sync_mode
=
WB_SYNC_ALL
,
.
nr_to_write
=
LONG_MAX
,
.
range_start
=
range_start
,
.
range_end
=
range_end
,
};
int
ret
=
0
;
BUG_ON
(
!
PageLocked
(
page
));
for
(;;)
{
req
=
nfs_page_find_request
(
page
);
if
(
req
==
NULL
)
goto
out
;
if
(
test_bit
(
PG_NEED_COMMIT
,
&
req
->
wb_flags
))
{
nfs_release_request
(
req
);
break
;
}
if
(
nfs_lock_request_dontget
(
req
))
{
nfs_inode_remove_request
(
req
);
/*
* In case nfs_inode_remove_request has marked the
* page as being dirty
*/
cancel_dirty_page
(
page
,
PAGE_CACHE_SIZE
);
nfs_unlock_request
(
req
);
break
;
}
ret
=
nfs_wait_on_request
(
req
);
if
(
ret
<
0
)
goto
out
;
}
if
(
!
PagePrivate
(
page
))
return
0
;
ret
=
nfs_sync_mapping_wait
(
page
->
mapping
,
&
wbc
,
FLUSH_INVALIDATE
);
out:
return
ret
;
}
int
nfs_wb_page_priority
(
struct
inode
*
inode
,
struct
page
*
page
,
int
how
)
{
loff_t
range_start
=
page_offset
(
page
);
...
...
include/linux/nfs_fs.h
浏览文件 @
b1330031
...
...
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);
extern
int
nfs_wb_all
(
struct
inode
*
inode
);
extern
int
nfs_wb_page
(
struct
inode
*
inode
,
struct
page
*
page
);
extern
int
nfs_wb_page_priority
(
struct
inode
*
inode
,
struct
page
*
page
,
int
how
);
extern
int
nfs_wb_page_cancel
(
struct
inode
*
inode
,
struct
page
*
page
);
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
extern
int
nfs_commit_inode
(
struct
inode
*
,
int
);
extern
struct
nfs_write_data
*
nfs_commit_alloc
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录