- 14 10月, 2016 1 次提交
-
-
由 Benjamin Coddington 提交于
Commit 41963c10 sets the block layout's last written byte to the offset of the end of the extent rather than the end of the write which incorrectly updates the inode's size for partial-page writes. Fixes: 41963c10 ("pnfs/blocklayout: update last_write_offset atomically with extents") Signed-off-by: NBenjamin Coddington <bcodding@redhat.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Tested-by: NChristoph Hellwig <hch@lst.de> Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
- 05 10月, 2016 2 次提交
-
-
由 Jeff Layton 提交于
The caller of rpc_run_task also gets a reference that must be put. Signed-off-by: NJeff Layton <jeff.layton@primarydata.com> Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Deepa Dinamani 提交于
boot_time is represented as a struct timespec. struct timespec and CURRENT_TIME are not y2038 safe. Overall, the plan is to use timespec64 and ktime_t for all internal kernel representation of timestamps. CURRENT_TIME will also be removed. boot_time is used to construct the nfs client boot verifier. Use ktime_t to represent boot_time and ktime_get_real() for the boot_time value. Following Trond's request https://lkml.org/lkml/2016/6/9/22 , use ktime_t instead of converting to struct timespec64. Use higher and lower 32 bit parts of ktime_t for the boot verifier. Use the lower 32 bit part of ktime_t for the authsys_parms stamp field. Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Cc: Anna Schumaker <anna.schumaker@netapp.com> Cc: linux-nfs@vger.kernel.org Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
- 01 10月, 2016 5 次提交
-
-
由 Frank Sorenson 提交于
Replace the generic code to hash the auth_cred with the call to the auth-specific hash function in the rpc_authops struct. Signed-off-by: NFrank Sorenson <sorenson@redhat.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Frank Sorenson 提交于
Add a hash_cred() function for RPCSEC_GSS, using only the uid from the auth_cred. Signed-off-by: NFrank Sorenson <sorenson@redhat.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Frank Sorenson 提交于
Add a hash_cred() function for auth_unix, using both the uid and gid from the auth_cred. Signed-off-by: NFrank Sorenson <sorenson@redhat.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Frank Sorenson 提交于
Add a hash_cred() function for generic_auth, using both the uid and gid from the auth_cred. Signed-off-by: NFrank Sorenson <sorenson@redhat.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Frank Sorenson 提交于
Currently, a single hash algorithm is used to hash the auth_cred for the credcache for all rpc_auth types. Add a hash_cred() function to the rpc_authops struct to allow a hash function specific to each auth flavor. Signed-off-by: NFrank Sorenson <sorenson@redhat.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
- 30 9月, 2016 1 次提交
-
-
由 Olga Kornievskaia 提交于
If an operation got interrupted, then since we don't know if the server processed it on not, we keep the seq#. Upon reuse of slot and seq# if we get reply from the cache (ie EREMOTEIO) then we need to retry the operation after bumping the seq# Signed-off-by: NOlga Kornievskaia <kolga@netapp.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
- 28 9月, 2016 31 次提交
-
-
由 Trond Myklebust 提交于
Fix the code so that we always mark the atime as invalid in nfs4_read_done(). Currently, the expectation appears to be that the pNFS drivers should always do this, with the result that most of them don't. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Ke Wang 提交于
sunrpc uses workqueue to clean cache regulary. There is no real dependency of executing work on the cpu which queueing it. On a idle system, especially for a heterogeneous systems like big.LITTLE, it is observed that the big idle cpu was woke up many times just to service this work, which against the principle of power saving. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. After apply this patch, system_wq will be replaced by system_power_efficient_wq for sunrpc. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Signed-off-by: NKe Wang <ke.wang@spreadtrum.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
TEST_STATEID only tells you that you have a valid open stateid. It doesn't tell the client anything about whether or not it holds the required share locks. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> [Anna: Wrap nfs_open_stateid_recover_openmode in CONFIG_NFS_V4_1 checks] Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
_nfs41_free_stateid() needs to be cached by the session, but nfs41_test_stateid() may return NFS4ERR_RETRY_UNCACHED_REP (in which case we should just retry). Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the file permissions change on the server, then we may not be able to recover open state. If so, we need to ensure that we mark the file descriptor appropriately. Cc: stable@vger.kernel.org Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
We need to test the NFS_OPEN_STATE flag for whether or not the open_stateid is valid. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If we're not yet sure that all state has expired or been revoked, we should try to do a minimal recovery on just the one stateid. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Don't rely on nfs_inode_detach_delegation() succeeding. That can race... Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If we're replacing an old stateid which has a different 'other' field, then we probably need to free the old stateid. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If we race with a delegreturn before taking the spin lock, we currently end up dropping the delegation stateid. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
The actual stateid used in the READ or WRITE can represent a delegation, a lock or a stateid, so it is useful to pass it as an argument to the exception handler when an expired/revoked response is received from the server. It also ensures that we don't re-label the state as needing recovery if that has already occurred. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Handle revoked open/lock/delegation stateids when LAYOUTGET tells us the state was revoked. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the server tells us our stateid has expired, then handle that as if it was revoked. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the server tells us our stateid has expired, then handle that as if it was revoked. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Modify the helper nfs_inode_find_state_and_recover() so that it can check all open/lock/delegation state trackers on that inode for whether or not they need are affected by a revoked stateid error. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
This fixes a potential infinite loop in nfs_reap_expired_delegations. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If a server returns NFS4ERR_ADMIN_REVOKED, NFS4ERR_DELEG_REVOKED or NFS4ERR_EXPIRED on a call to close, open_downgrade, delegreturn, or locku, we should call FREE_STATEID before attempting to recover. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Nothing should need to be serialised with FREE_STATEID on the client, so let's make the RPC call always asynchronous. Also constify the stateid argument. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Right now, we're only running TEST/FREE_STATEID on the locks if the open stateid recovery succeeds. The protocol requires us to always do so. The fix would be to move the call to TEST/FREE_STATEID and do it before we attempt open recovery. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
In some cases (e.g. when the SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED sequence flag is set) we may already know that the stateid was revoked and that the only valid operation we can call is FREE_STATEID. In those cases, allow the stateid to carry the information in the type field, so that we skip the redundant call to TEST_STATEID. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Ensure we don't spam the server with test_stateid() calls for delegations that have already been checked. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Ensure that if the server reboots while we're testing and recovering from revoked delegations, we exit to allow the state manager to handle matters. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
According to RFC5661, if any of the SEQUENCE status bits SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED, SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, SEQ4_STATUS_ADMIN_STATE_REVOKED, or SEQ4_STATUS_RECALLABLE_STATE_REVOKED are set, then we need to use TEST_STATEID to figure out which stateids have been revoked, so we can acknowledge the loss of state using FREE_STATEID. While we already do this for open and lock state, we have not been doing so for all the delegations. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
Allow the callers of nfs_remove_bad_delegation() to specify the stateid that needs to be marked as bad. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
In NFSv4.1 and newer, if the server decides to revoke some or all of the protocol state, the client is required to iterate through all the stateids that it holds and call TEST_STATEID to determine which stateids still correspond to valid state, and then call FREE_STATEID on the others. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the server crashes while we're testing stateids for validity, then we want to initiate session recovery. Usually, we will be calling from a state manager thread, though, so we don't really want to wait. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the delegation has been marked as revoked, we don't have to test it, because we should already have called FREE_STATEID on it. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NOlek Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
We must not allow the use of delegations that have been revoked or are being returned. Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Fixes: 869f9dfa ("NFSv4: Fix races between nfs_remove_bad_delegation()...") Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.19+ Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-
由 Trond Myklebust 提交于
If the delegation is revoked, then it can't be used for caching. Fixes: 869f9dfa ("NFSv4: Fix races between nfs_remove_bad_delegation()...") Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.19+ Tested-by: NOleg Drokin <green@linuxhacker.ru> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
-