Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7af7a596
Commit
7af7a596
authored
Aug 20, 2017
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfixes'
parents
b7561e51
53a75f22
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
45 deletions
+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
No files found.
fs/nfs/nfs4_fs.h
View file @
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
View file @
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
);
}
}
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
;
if
(
!
pgio
->
pg_ops
->
pg_get_mirror_count
)
return
0
;
unsigned
int
mirror_count
=
1
;
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
(
pgio
->
pg_error
<
0
)
return
pgio
->
pg_error
;
if
(
!
mirror_count
||
mirror_count
>
NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX
)
return
-
EINVAL
;
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment