#
025bb9f8 |
| 04-Jun-2018 |
Chuck Lever <chuck.lever@oracle.com> |
NFSv4.0: Remove transport protocol name from non-UCS client ID
Commit 69dd716c5ffd ("NFSv4: Add socket proto argument to setclientid") (2007) added the transport protocol name to the client ID strin
NFSv4.0: Remove transport protocol name from non-UCS client ID
Commit 69dd716c5ffd ("NFSv4: Add socket proto argument to setclientid") (2007) added the transport protocol name to the client ID string, but the patch description doesn't explain why this was necessary.
At that time, the only transport protocol name that would have been used is "tcp" (for both IPv4 and IPv6), resulting in no additional distinctiveness of the client ID string.
Since there is one client instance, the server should recognize it's state whether the client is connecting via TCP or RDMA. Same client, same lease.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
848a4eb2 |
| 04-Jun-2018 |
Chuck Lever <chuck.lever@oracle.com> |
NFSv4.0: Remove cl_ipaddr from non-UCS client ID
It is possible for two distinct clients to have the same cl_ipaddr:
- if the client admin disables callback with clientaddr=0.0.0.0 on more than
NFSv4.0: Remove cl_ipaddr from non-UCS client ID
It is possible for two distinct clients to have the same cl_ipaddr:
- if the client admin disables callback with clientaddr=0.0.0.0 on more than one client
- if two clients behind separate NATs use the same private subnet number
- if the client admin specifies the same address via clientaddr= mount option (pointing the server at the same NAT box, for example)
Because of the way the Linux NFSv4.0 client constructs its client ID string by default, such clients could interfere with each others' lease state when mounting the same server:
scnprintf(str, len, "Linux NFSv4.0 %s/%s %s", clp->cl_ipaddr, rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR), rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO));
cl_ipaddr is set to the value of the clientaddr= mount option. Two clients whose addresses are 192.168.3.77 that mount the same server (whose public IP address is, say, 3.4.5.6) would both generate the same client ID string when sending a SETCLIENTID:
Linux NFSv4.0 192.168.3.77/3.4.5.6 tcp
and thus the server would not be able to distinguish the clients' leases. If both clients are using AUTH_SYS when sending SETCLIENTID then the server could possibly permit the two clients to interfere with or purge each others' leases.
To better ensure that Linux's NFSv4.0 client ID strings are distinct in these cases, remove cl_ipaddr from the client ID string and replace it with something more likely to be unique. Note that the replacement looks a lot like the uniform client ID string.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
977294c7 |
| 05-Jun-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
NFSv4: Fix a compiler warning when CONFIG_NFS_V4_1 is undefined
Fix a compiler warning: fs/nfs/nfs4proc.c:910:13: warning: 'nfs4_layoutget_release' defined but not used [-Wunused-function] static v
NFSv4: Fix a compiler warning when CONFIG_NFS_V4_1 is undefined
Fix a compiler warning: fs/nfs/nfs4proc.c:910:13: warning: 'nfs4_layoutget_release' defined but not used [-Wunused-function] static void nfs4_layoutget_release(void *calldata) ^~~~~~~~~~~~~~~~~~~~~~
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
7c672654 |
| 04-Jun-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
NFSv4: Ignore NFS_INO_REVAL_FORCED in nfs4_proc_access
If we hold a delegation, we don't need to care about whether or not the inode attributes are up to date. We know we can cache the results of th
NFSv4: Ignore NFS_INO_REVAL_FORCED in nfs4_proc_access
If we hold a delegation, we don't need to care about whether or not the inode attributes are up to date. We know we can cache the results of this call regardless.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
2f28dc38 |
| 08-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4: Don't ask for delegated attributes when adding a hard link
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
#
771734f2 |
| 07-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4: Don't ask for delegated attributes when revalidating the inode
Again, when revalidating the inode, we don't need to ask for attributes for which we are authoritative.
Signed-off-by: Trond My
NFSv4: Don't ask for delegated attributes when revalidating the inode
Again, when revalidating the inode, we don't need to ask for attributes for which we are authoritative.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
a841b54d |
| 07-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFS: Pass the inode down to the getattr() callback
Allow the getattr() callback to check things like whether or not we hold a delegation so that it can adjust the attributes that it is asking for.
NFS: Pass the inode down to the getattr() callback
Allow the getattr() callback to check things like whether or not we hold a delegation so that it can adjust the attributes that it is asking for.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
30846df0 |
| 07-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4: Don't request size+change attribute if they are delegated to us
When we hold a delegation, we should not need to request attributes such as the file size or the change attribute. For some ser
NFSv4: Don't request size+change attribute if they are delegated to us
When we hold a delegation, we should not need to request attributes such as the file size or the change attribute. For some servers, avoiding asking for these unneeded attributes can improve the overall system performance.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
ae55e59d |
| 22-May-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
pnfs: Don't release the sequence slot until we've processed layoutget on open
If the server recalls the layout that was just handed out, we risk hitting a race as described in RFC5661 Section 2.10.6
pnfs: Don't release the sequence slot until we've processed layoutget on open
If the server recalls the layout that was just handed out, we risk hitting a race as described in RFC5661 Section 2.10.6.3 unless we ensure that we release the sequence slot after processing the LAYOUTGET operation that was sent as part of the OPEN compound.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
30ae2412 |
| 18-Oct-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Fix manipulation of NFS_LAYOUT_FIRST_LAYOUTGET
The flag was not always being cleared after LAYOUTGET on OPEN.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust
pnfs: Fix manipulation of NFS_LAYOUT_FIRST_LAYOUTGET
The flag was not always being cleared after LAYOUTGET on OPEN.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
6e01260c |
| 04-Oct-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Stop attempting LAYOUTGET on OPEN on failure
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
#
29a8bfe5 |
| 30-May-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
pNFS: Refactor nfs4_layoutget_release()
Move the actual freeing of the struct nfs4_layoutget into fs/nfs/pnfs.c where it can be reused by the layoutget on open code.
Signed-off-by: Trond Myklebust
pNFS: Refactor nfs4_layoutget_release()
Move the actual freeing of the struct nfs4_layoutget into fs/nfs/pnfs.c where it can be reused by the layoutget on open code.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
2409a976 |
| 06-Oct-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Add LAYOUTGET to OPEN of a new file
This triggers when have no pre-existing inode to attach to. The preexisting case is saved for later.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Sig
pnfs: Add LAYOUTGET to OPEN of a new file
This triggers when have no pre-existing inode to attach to. The preexisting case is saved for later.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
1b146fcf |
| 21-Sep-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Move nfs4_opendata into nfs4_fs.h
It will be needed now by the pnfs code.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
#
56f487f8 |
| 21-Sep-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Add conditional encode/decode of LAYOUTGET within OPEN compound
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
#
dacb452d |
| 19-Sep-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: move allocations out of nfs4_proc_layoutget
They work better in the new alloc_init function.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust
pnfs: move allocations out of nfs4_proc_layoutget
They work better in the new alloc_init function.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
3b65a30d |
| 19-Sep-2016 |
Fred Isaman <fred.isaman@gmail.com> |
NFS4: move ctx into nfs4_run_open_task
Preparing to add conditional LAYOUTGET to OPEN rpc, the LAYOUTGET will need the ctx info.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Tr
NFS4: move ctx into nfs4_run_open_task
Preparing to add conditional LAYOUTGET to OPEN rpc, the LAYOUTGET will need the ctx info.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
34ec9aac |
| 20-Sep-2016 |
Fred Isaman <fred.isaman@gmail.com> |
pnfs: Remove redundant assignment from nfs4_proc_layoutget().
nfs_init_sequence() will clear this for us.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.my
pnfs: Remove redundant assignment from nfs4_proc_layoutget().
nfs_init_sequence() will clear this for us.
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
a3cf9bca |
| 03-May-2018 |
Benjamin Coddington <bcodding@redhat.com> |
NFSv4: Don't add a new lock on an interrupted wait for LOCK
If the wait for a LOCK operation is interrupted, and then the file is closed, the locks cleanup code will assume that no new locks will be
NFSv4: Don't add a new lock on an interrupted wait for LOCK
If the wait for a LOCK operation is interrupted, and then the file is closed, the locks cleanup code will assume that no new locks will be added to the inode after it has completed. We already have a mechanism to detect if there was signal, so let's use that to avoid recreating the local lock once the RPC completes. Also skip re-sending the LOCK operation for the various error cases if we were signaled.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com> [Trond: Fix inverted test of locks_lock_inode_wait()] Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
cf61eb26 |
| 29-May-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
NFSv4: Always clear the pNFS layout when handling ESTALE
If we get an ESTALE error in response to an RPC call operating on the file on the MDS, we should immediately cancel the layout for that file.
NFSv4: Always clear the pNFS layout when handling ESTALE
If we get an ESTALE error in response to an RPC call operating on the file on the MDS, we should immediately cancel the layout for that file.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
472f761e |
| 08-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFS: Ensure we revalidate the inode correctly after setacl
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
#
ed7e9ad0 |
| 30-May-2018 |
Trond Myklebust <trond.myklebust@hammerspace.com> |
NFSv4: Fix sillyrename to return the delegation when appropriate
Ensure that we pass down the inode of the file being deleted so that we can return any delegation being held.
Signed-off-by: Trond M
NFSv4: Fix sillyrename to return the delegation when appropriate
Ensure that we pass down the inode of the file being deleted so that we can return any delegation being held.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
991eedb1 |
| 09-Apr-2018 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4: Only pass the delegation to setattr if we're sending a truncate
Even then it isn't really necessary. The reason why we may not want to pass in a stateid in other cases is that we cannot use t
NFSv4: Only pass the delegation to setattr if we're sending a truncate
Even then it isn't really necessary. The reason why we may not want to pass in a stateid in other cases is that we cannot use the delegation credential.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
2f261020 |
| 15-May-2018 |
Anna Schumaker <Anna.Schumaker@Netapp.com> |
NFS: Merge nfs41_free_stateid() with _nfs41_free_stateid()
Having these exist as two functions doesn't seem to add anything useful, and I think merging them together makes this easier to follow.
Si
NFS: Merge nfs41_free_stateid() with _nfs41_free_stateid()
Having these exist as two functions doesn't seem to add anything useful, and I think merging them together makes this easier to follow.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|
#
fba83f34 |
| 04-May-2018 |
Anna Schumaker <Anna.Schumaker@Netapp.com> |
NFS: Pass "privileged" value to nfs4_init_sequence()
We currently have a separate function just to set this, but I think it makes more sense to set it at the same time as the other values in nfs4_in
NFS: Pass "privileged" value to nfs4_init_sequence()
We currently have a separate function just to set this, but I think it makes more sense to set it at the same time as the other values in nfs4_init_sequence()
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
show more ...
|