Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7af7a596
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看板
提交
7af7a596
编写于
8月 20, 2017
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bugfixes'
上级
b7561e51
53a75f22
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
70 addition
and
45 deletion
+70
-45
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+11
-0
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+40
-37
fs/nfs/read.c
fs/nfs/read.c
+1
-1
fs/nfs/super.c
fs/nfs/super.c
+8
-4
fs/nfs/write.c
fs/nfs/write.c
+1
-1
include/linux/nfs_page.h
include/linux/nfs_page.h
+1
-2
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+8
-0
未找到文件。
fs/nfs/nfs4_fs.h
浏览文件 @
7af7a596
...
...
@@ -303,6 +303,17 @@ _nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode,
struct
rpc_cred
*
newcred
=
NULL
;
rpc_authflavor_t
flavor
;
if
(
sp4_mode
==
NFS_SP4_MACH_CRED_CLEANUP
||
sp4_mode
==
NFS_SP4_MACH_CRED_PNFS_CLEANUP
)
{
/* Using machine creds for cleanup operations
* is only relevent if the client credentials
* might expire. So don't bother for
* RPC_AUTH_UNIX. If file was only exported to
* sec=sys, the PUTFH would fail anyway.
*/
if
((
*
clntp
)
->
cl_auth
->
au_flavor
==
RPC_AUTH_UNIX
)
return
false
;
}
if
(
test_bit
(
sp4_mode
,
&
clp
->
cl_sp4_flags
))
{
spin_lock
(
&
clp
->
cl_lock
);
if
(
clp
->
cl_machine_cred
!=
NULL
)
...
...
fs/nfs/pagelist.c
浏览文件 @
7af7a596
...
...
@@ -682,12 +682,8 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
const
struct
nfs_pgio_completion_ops
*
compl_ops
,
const
struct
nfs_rw_ops
*
rw_ops
,
size_t
bsize
,
int
io_flags
,
gfp_t
gfp_flags
)
int
io_flags
)
{
struct
nfs_pgio_mirror
*
new
;
int
i
;
desc
->
pg_moreio
=
0
;
desc
->
pg_inode
=
inode
;
desc
->
pg_ops
=
pg_ops
;
...
...
@@ -703,23 +699,10 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
desc
->
pg_mirror_count
=
1
;
desc
->
pg_mirror_idx
=
0
;
if
(
pg_ops
->
pg_get_mirror_count
)
{
/* until we have a request, we don't have an lseg and no
* idea how many mirrors there will be */
new
=
kcalloc
(
NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX
,
sizeof
(
struct
nfs_pgio_mirror
),
gfp_flags
);
desc
->
pg_mirrors_dynamic
=
new
;
desc
->
pg_mirrors
=
new
;
for
(
i
=
0
;
i
<
NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX
;
i
++
)
nfs_pageio_mirror_init
(
&
desc
->
pg_mirrors
[
i
],
bsize
);
}
else
{
desc
->
pg_mirrors_dynamic
=
NULL
;
desc
->
pg_mirrors
=
desc
->
pg_mirrors_static
;
nfs_pageio_mirror_init
(
&
desc
->
pg_mirrors
[
0
],
bsize
);
}
desc
->
pg_mirrors_dynamic
=
NULL
;
desc
->
pg_mirrors
=
desc
->
pg_mirrors_static
;
nfs_pageio_mirror_init
(
&
desc
->
pg_mirrors
[
0
],
bsize
);
}
EXPORT_SYMBOL_GPL
(
nfs_pageio_init
);
/**
* nfs_pgio_result - Basic pageio error handling
...
...
@@ -836,32 +819,52 @@ static int nfs_generic_pg_pgios(struct nfs_pageio_descriptor *desc)
return
ret
;
}
static
struct
nfs_pgio_mirror
*
nfs_pageio_alloc_mirrors
(
struct
nfs_pageio_descriptor
*
desc
,
unsigned
int
mirror_count
)
{
struct
nfs_pgio_mirror
*
ret
;
unsigned
int
i
;
kfree
(
desc
->
pg_mirrors_dynamic
);
desc
->
pg_mirrors_dynamic
=
NULL
;
if
(
mirror_count
==
1
)
return
desc
->
pg_mirrors_static
;
ret
=
kmalloc_array
(
mirror_count
,
sizeof
(
*
ret
),
GFP_NOFS
);
if
(
ret
!=
NULL
)
{
for
(
i
=
0
;
i
<
mirror_count
;
i
++
)
nfs_pageio_mirror_init
(
&
ret
[
i
],
desc
->
pg_bsize
);
desc
->
pg_mirrors_dynamic
=
ret
;
}
return
ret
;
}
/*
* nfs_pageio_setup_mirroring - determine if mirroring is to be used
* by calling the pg_get_mirror_count op
*/
static
int
nfs_pageio_setup_mirroring
(
struct
nfs_pageio_descriptor
*
pgio
,
static
void
nfs_pageio_setup_mirroring
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
req
)
{
int
mirror_count
=
1
;
unsigned
int
mirror_count
=
1
;
if
(
!
pgio
->
pg_ops
->
pg_get_mirror_count
)
return
0
;
mirror_count
=
pgio
->
pg_ops
->
pg_get_mirror_count
(
pgio
,
req
);
if
(
pgio
->
pg_error
<
0
)
return
pgio
->
pg_error
;
if
(
!
mirror_count
||
mirror_count
>
NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX
)
return
-
EINVAL
;
if
(
pgio
->
pg_ops
->
pg_get_mirror_count
)
mirror_count
=
pgio
->
pg_ops
->
pg_get_mirror_count
(
pgio
,
req
);
if
(
mirror_count
==
pgio
->
pg_mirror_count
||
pgio
->
pg_error
<
0
)
return
;
if
(
WARN_ON_ONCE
(
!
pgio
->
pg_mirrors_dynamic
))
return
-
EINVAL
;
if
(
!
mirror_count
||
mirror_count
>
NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX
)
{
pgio
->
pg_error
=
-
EINVAL
;
return
;
}
pgio
->
pg_mirrors
=
nfs_pageio_alloc_mirrors
(
pgio
,
mirror_count
);
if
(
pgio
->
pg_mirrors
==
NULL
)
{
pgio
->
pg_error
=
-
ENOMEM
;
pgio
->
pg_mirrors
=
pgio
->
pg_mirrors_static
;
mirror_count
=
1
;
}
pgio
->
pg_mirror_count
=
mirror_count
;
return
0
;
}
/*
...
...
fs/nfs/read.c
浏览文件 @
7af7a596
...
...
@@ -68,7 +68,7 @@ void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
pg_ops
=
server
->
pnfs_curr_ld
->
pg_read_ops
;
#endif
nfs_pageio_init
(
pgio
,
inode
,
pg_ops
,
compl_ops
,
&
nfs_rw_read_ops
,
server
->
rsize
,
0
,
GFP_KERNEL
);
server
->
rsize
,
0
);
}
EXPORT_SYMBOL_GPL
(
nfs_pageio_init_read
);
...
...
fs/nfs/super.c
浏览文件 @
7af7a596
...
...
@@ -1691,8 +1691,8 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
rpc_authflavor_t
*
server_authlist
,
unsigned
int
count
)
{
rpc_authflavor_t
flavor
=
RPC_AUTH_MAXFLAVOR
;
bool
found_auth_null
=
false
;
unsigned
int
i
;
int
use_auth_null
=
false
;
/*
* If the sec= mount option is used, the specified flavor or AUTH_NULL
...
...
@@ -1701,6 +1701,10 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
* AUTH_NULL has a special meaning when it's in the server list - it
* means that the server will ignore the rpc creds, so any flavor
* can be used but still use the sec= that was specified.
*
* Note also that the MNT procedure in MNTv1 does not return a list
* of supported security flavors. In this case, nfs_mount() fabricates
* a security flavor list containing just AUTH_NULL.
*/
for
(
i
=
0
;
i
<
count
;
i
++
)
{
flavor
=
server_authlist
[
i
];
...
...
@@ -1709,11 +1713,11 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
goto
out
;
if
(
flavor
==
RPC_AUTH_NULL
)
use
_auth_null
=
true
;
found
_auth_null
=
true
;
}
if
(
use
_auth_null
)
{
flavor
=
RPC_AUTH_NULL
;
if
(
found
_auth_null
)
{
flavor
=
args
->
auth_info
.
flavors
[
0
]
;
goto
out
;
}
...
...
fs/nfs/write.c
浏览文件 @
7af7a596
...
...
@@ -1424,7 +1424,7 @@ void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,
pg_ops
=
server
->
pnfs_curr_ld
->
pg_write_ops
;
#endif
nfs_pageio_init
(
pgio
,
inode
,
pg_ops
,
compl_ops
,
&
nfs_rw_write_ops
,
server
->
wsize
,
ioflags
,
GFP_NOIO
);
server
->
wsize
,
ioflags
);
}
EXPORT_SYMBOL_GPL
(
nfs_pageio_init_write
);
...
...
include/linux/nfs_page.h
浏览文件 @
7af7a596
...
...
@@ -125,8 +125,7 @@ extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
const
struct
nfs_pgio_completion_ops
*
compl_ops
,
const
struct
nfs_rw_ops
*
rw_ops
,
size_t
bsize
,
int
how
,
gfp_t
gfp_flags
);
int
how
);
extern
int
nfs_pageio_add_request
(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
);
extern
int
nfs_pageio_resend
(
struct
nfs_pageio_descriptor
*
,
...
...
net/sunrpc/clnt.c
浏览文件 @
7af7a596
...
...
@@ -1903,6 +1903,14 @@ call_connect_status(struct rpc_task *task)
task
->
tk_status
=
0
;
switch
(
status
)
{
case
-
ECONNREFUSED
:
/* A positive refusal suggests a rebind is needed. */
if
(
RPC_IS_SOFTCONN
(
task
))
break
;
if
(
clnt
->
cl_autobind
)
{
rpc_force_rebind
(
clnt
);
task
->
tk_action
=
call_bind
;
return
;
}
case
-
ECONNRESET
:
case
-
ECONNABORTED
:
case
-
ENETUNREACH
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录