- 05 Jan, 2012 1 commit
-
-
Andy Adamson authored
We are either initializing or resetting a session. Initialize or reset the session slot tables accordingly. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 10 Dec, 2011 1 commit
-
-
Trond Myklebust authored
...and report the servers that try to return a delegation when the client is using the CLAIM_DELEG_CUR open mode. That behaviour is explicitly forbidden in RFC3530. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 07 Nov, 2011 1 commit
-
-
Trond Myklebust authored
Fix a regression that was introduced by commit 0c2e53f1 (NFS: Remove the unused "lookupfh()" version of nfs4_proc_lookup()). In the case where the lookup gets an NFS4ERR_MOVED, we want to return the result of nfs4_get_referral(). Instead, that value is getting clobbered by the call to nfs4_handle_exception()... Reported-by:
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Tested-by:
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 04 Nov, 2011 1 commit
-
-
Jeff Layton authored
commit d953126a changed how nfs_atomic_lookup handles an -EISDIR return from an OPEN call. Prior to that patch, that caused the client to fall back to doing a normal lookup. When that patch went in, the code began returning that error to userspace. The d_revalidate codepath however never had the corresponding change, so it was still possible to end up with a NULL ctx->state pointer after that. That patch caused a regression. When we attempt to open a directory that does not have a cached dentry, that open now errors out with EISDIR. If you attempt the same open with a cached dentry, it will succeed. Fix this by reverting the change in nfs_atomic_lookup and allowing attempts to open directories to fall back to a normal lookup Also, add a NFSv4-specific f_ops->open routine that just returns -ENOTDIR. This should never be called if things are working properly, but if it ever is, then the dprintk may help in debugging. To facilitate this, a new file_operations field is also added to the nfs_rpc_ops struct. Cc: stable@kernel.org Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 31 Oct, 2011 1 commit
-
-
Peng Tao authored
Current pnfs_layoutcommit_inode can not handle parallel layoutcommit. And as Trond suggested , there is no need for client to optimize for parallel layoutcommit. So add NFS_INO_LAYOUTCOMMITTING flag to mark inflight layoutcommit and serialize lalyoutcommit with it. Also mark_inode_dirty_sync if pnfs_layoutcommit_inode fails to issue layoutcommit. Reported-by:
Vitaliy Gusev <gusev.vitaliy@nexenta.com> Signed-off-by:
Peng Tao <peng_tao@emc.com> Signed-off-by:
Jim Rees <rees@umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 19 Oct, 2011 1 commit
-
-
Trond Myklebust authored
It can trivially be replaced with rpc_restart_call_prepare. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 18 Oct, 2011 3 commits
-
-
Trond Myklebust authored
Both LOOKUP and OPEN operations may return NFS4ERR_BADNAME if we send a an invalid name as a filename argument. As far as the application is concerned, it just has to know that the file doesn't exist, and so ENOENT would be the appropriate reply. We should only return EINVAL if the filename is being used to _create_ a new object on the remote filesystem. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
...and also remove the associated nfs_v4_clientops entry. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 24 Aug, 2011 4 commits
-
-
Trond Myklebust authored
The NFSv4 spec does not specify that the server must repeat that error, so in order to avoid having the delegations revoked, we should handle it immediately. Also note that NFS4ERR_CB_PATH_DOWN does in fact renew the lease... Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
RFC3530 states that if the client holds a delegation, then it is obliged to continue to send RENEW calls once every lease period in order to allow the server to return NFS4ERR_CB_PATH_DOWN if the callback path is unreachable. This is not required for NFSv4.1, since the server can at any time set the SEQ4_STATUS_CB_PATH_DOWN_SESSION in any SEQUENCE operation. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
We shouldn't allow the renew daemon to do direct reclaim on the NFS partition. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 31 Jul, 2011 4 commits
-
-
Andy Adamson authored
This gives layout driver a chance to cleanup structures they put in at encode_layoutcommit. Signed-off-by:
Andy Adamson <andros@netapp.com> [fixup layout header pointer for layoutcommit] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Benny Halevy <bhalevy@tonian.com> [rm inode and pnfs_layout_hdr args from cleanup_layoutcommit()] Signed-off-by:
Jim Rees <rees@umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Fred Isaman authored
Block layout needs it to determine IO size. Signed-off-by:
Fred Isaman <iisaman@citi.umich.edu> Signed-off-by:
Tao Guo <glorioustao@gmail.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Benny Halevy <bhalevy@tonian.com> Signed-off-by:
Jim Rees <rees@umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Andy Adamson authored
The block driver uses GETDEVICELIST Signed-off-by:
Andy Adamson <andros@netapp.com> [pass struct nfs_server * to getdevicelist] [get machince creds for getdevicelist] [fix getdevicelist decode sizing] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Benny Halevy <bhalevy@tonian.com> Signed-off-by:
Jim Rees <rees@umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Peng Tao authored
There can be multiple lseg per file, so layoutcommit should be able to handle it. [Needed in v3.0] CC: Stable Tree <stable@kernel.org> Signed-off-by:
Peng Tao <peng_tao@emc.com> Signed-off-by:
Boaz Harrosh <bharrosh@panasas.com> Signed-off-by:
Jim Rees <rees@umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 20 Jul, 2011 3 commits
-
-
Al Viro authored
just dentry, please... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
instead of path_get()/path_put(), we can just use nfs_sb_{,de}active() to pin the superblock down. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 12 Jul, 2011 6 commits
-
-
Trond Myklebust authored
Since we take a reference to it, we really ought to pass the a pointer to the layout header in the arguments instead of assuming that NFS_I(inode)->layout will forever point to the correct object. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
When recovering open files and locks, the stateid should be tested against the server and freed if it is invalid. This patch adds new recovery functions for NFS v4.1. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
FREE_STATEID is used to tell the server that we want to free a stateid that no longer has any locks associated with it. This allows the client to reclaim locks without encountering edge conditions documented in section 8.4.3 of RFC 5661. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
This patch adds in the xdr for doing a TEST_STATEID call with a single stateid. RFC 5661 allows multiple stateids to be tested in a single call, but only testing one keeps things simpler for now. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
If the client is using NFS v4.1, then we can use SECINFO_NO_NAME to find the secflavor for the initial mount. If the server doesn't support SECINFO_NO_NAME then I fall back on the "guess and check" method used for v4.0 mounts. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Weston Andros Adamson authored
can be skipped if the "eir_server_scope" from the exchange_id proc differs from previous calls. Also, in the future server_scope will be useful for determining whether client trunking is available Signed-off-by:
Weston Andros Adamson <dros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 15 Jun, 2011 3 commits
-
-
Fred Isaman authored
_pnfs_return_layout had the following problems: - it did not call pnfs_free_lseg_list on all paths - it unintentionally did a forgetful return when there was no outstanding io - it raced with concurrent LAYOUTGETS Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Andy Adamson authored
Commit 28331a46 "Ensure we request the ordinary fileid when doing readdirplus" changed the meaning of NFS_ATTR_FATTR_FILEID which used to be set when FATTR4_WORD1_MOUNTED_ON_FILED was requested. Allow nfs_fhget to succeed with only a mounted on fileid when crossing a mountpoint or a referral. Ask for the fileid of the absent file system if mounted_on_fileid is not supported. Signed-off-by:
Andy Adamson <andros@netapp.com> cc:stable@kernel.org [2.6.39] Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Benny Halevy authored
We don't support header padding yet so better off ditching it Reported-by:
Sid Moore <learnmost@gmail.com> Signed-off-by:
Benny Halevy <benny@tonian.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 29 May, 2011 3 commits
-
-
Benny Halevy authored
With the objects layout security model, we have object capabilities that are associated with the layout and we anticipate that the server will issue a cb_layoutrecall for any setattr that changes security related attributes (user/group/mode/acl) or truncates the file. Therefore, the layout is returned before issuing the setattr to avoid the anticipated cb_layoutrecall. Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
Benny Halevy authored
NFSv4.1 LAYOUTRETURN implementation Currently, does not support layout-type payload encoding. Signed-off-by:
Alexandros Batsakis <batsakis@netapp.com> Signed-off-by:
Andy Adamson <andros@citi.umich.edu> Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Dean Hildebrand <dhildeb@us.ibm.com> Signed-off-by:
Fred Isaman <iisaman@citi.umich.edu> Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Marc Eshel <eshel@almaden.ibm.com> Signed-off-by:
Zhang Jingwang <zhangjingwang@nrchpc.ac.cn> [call pnfs_return_layout right before pnfs_destroy_layout] [remove assert_spin_locked from pnfs_clear_lseg_list] [remove wait parameter from the layoutreturn path.] [remove return_type field from nfs4_layoutreturn_args] [remove range from nfs4_layoutreturn_args] [no need to send layoutcommit from _pnfs_return_layout] [don't wait on sync layoutreturn] [fix layout stateid in layoutreturn args] [fixed NULL deref in _pnfs_return_layout] [removed recaim member of nfs4_layoutreturn_args] Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
Benny Halevy authored
Non-rpc layout driver such as for objects and blocks implement their own I/O path and error handling logic. Therefore bypass NFS-based error handling for these layout drivers. [fix lseg ref-count bugs, and null de-refs] [Fall out from: non-rpc layout drivers] Signed-off-by:
Boaz Harrosh <bharrosh@panasas.com> [get rid of PNFS_USE_RPC_CODE] [get rid of __nfs4_write_done_cb] [revert useless change in nfs4_write_done_cb] Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
- 27 May, 2011 1 commit
-
-
Trond Myklebust authored
Currently, if the server returns NFS4ERR_EXPIRED in reply to a READ or WRITE, but the RENEW test determines that the lease is still active, we fail to recover and end up looping forever in a READ/WRITE + RENEW death spiral. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
-
- 11 May, 2011 1 commit
-
-
Andy Adamson authored
Free the slot and resend the RPC with new session <slot#,seq#>. For nfs4_async_handle_error, return -EAGAIN and set the task->tk_status to 0 to restart the async rpc in the rpc_restart_call_prepare state which resets the slot. For nfs4_handle_exception, retrying a call that uses nfs4_call_sync will reset the slot via nfs41_call_sync_prepare. For open/close/lock/locku/delegreturn/layoutcommit/unlink/rename/write cachethis is true, so these operations will not trigger an NFS4ERR_RETRY_UNCACHED_REP. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 24 Apr, 2011 2 commits
-
-
Trond Myklebust authored
The following patch ensures that we do not get permanently trapped in the RPC layer when trying to establish a new client id or session. This again ensures that the state manager can finish in a timely fashion when the last filesystem to reference the nfs_client exits. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
If a server for some reason keeps sending NFS4ERR_DELAY errors, we can end up looping forever inside nfs4_proc_create_session, and so the usual mechanisms for detecting if the nfs_client is dead don't work. Fix this by ensuring that we loop inside the nfs4_state_manager thread instead. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 18 Apr, 2011 2 commits
-
-
Bryan Schumaker authored
I only want to try other secflavors during an initial mount if NFS4ERR_WRONGSEC is returned. nfs4_handle_exception() could potentially map other errors to EPERM, so we should handle this error specially for correctness. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
If we fail to contact the gss upcall program, then no message will be sent to the server. The client still updated the sequence number, however, and this lead to NFS4ERR_SEQ_MISMATCH for the next several RPC calls. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 13 Apr, 2011 2 commits
-
-
Bryan Schumaker authored
We were always attempting sec flavor negotiation, even if the user told us a specific sec flavor to use. If that sec flavor fails, we should return an error rather than continuing with sec flavor negotiation. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
nfs4_lookup_root() is already configured to use either RPC_AUTH_UNIX or a user specified flavor (through -o sec=<whatever>). We should use this flavor first, and only attempt negotiation if it fails with -EPERM. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-