#
b88fa69e |
| 23-Aug-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: The client must not do I/O to the DS if it's lease has expired
Ensure that the client conforms to the normative behaviour described in RFC5661 Section 12.7.2: "If a client believes its lease h
pNFS: The client must not do I/O to the DS if it's lease has expired
Ensure that the client conforms to the normative behaviour described in RFC5661 Section 12.7.2: "If a client believes its lease has expired, it MUST NOT send I/O to the storage device until it has validated its lease."
So ensure that we wait for the lease to be validated before using the layout.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.20+
show more ...
|
#
9a0fe867 |
| 19-Aug-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Handle NFS4ERR_OLD_STATEID correctly in LAYOUTSTAT calls
We normally want to update the stateid and then retry,
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
Revision tags: v4.4.17, openbmc-4.4-20160804-1, v4.4.16, v4.7 |
|
#
01d7b29f |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Remove redundant smp_mb() from pnfs_init_lseg()
It's not visible yet, and won't be until after we grab the inode->i_lock.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
119cef97 |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Cleanup - do layout segment initialisation in one place
...instead of splitting the initialisation over init_lseg() and pnfs_layout_process().
Signed-off-by: Trond Myklebust <trond.myklebust@
pNFS: Cleanup - do layout segment initialisation in one place
...instead of splitting the initialisation over init_lseg() and pnfs_layout_process().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
Revision tags: openbmc-4.4-20160722-1 |
|
#
28c1acff |
| 21-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Remove redundant stateid invalidation
The layout stateid will be invalidated once it holds no more layout segments anyway.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
f71dfe8f |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Remove redundant pnfs_mark_layout_returned_if_empty()
That's already being taken care of in pnfs_layout_remove_lseg().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
d9b61708 |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Clear the layout metadata if the server changed the layout stateid
If the server changed the layout stateid's "other" field, then we should treat the old layout as being completely gone. In th
pNFS: Clear the layout metadata if the server changed the layout stateid
If the server changed the layout stateid's "other" field, then we should treat the old layout as being completely gone. In that case, we want to clear the metadata such as scheduled layoutreturns.
Do this by calling pnfs_mark_layout_stateid_invalid().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
5f46be04 |
| 22-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Cleanup - don't open code pnfs_mark_layout_stateid_invalid()
Ensure nfs42_layoutstat_done() layoutget don't open code layout stateid invalidation.
Signed-off-by: Trond Myklebust <trond.mykleb
pNFS: Cleanup - don't open code pnfs_mark_layout_stateid_invalid()
Ensure nfs42_layoutstat_done() layoutget don't open code layout stateid invalidation.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
e036f464 |
| 22-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFS: pnfs_mark_matching_lsegs_return() should match the layout sequence id
When determining which layout segments to return, we do want pnfs_mark_matching_lsegs_return to check that they match the l
NFS: pnfs_mark_matching_lsegs_return() should match the layout sequence id
When determining which layout segments to return, we do want pnfs_mark_matching_lsegs_return to check that they match the layout sequence id. This ensures that we don't waste time if the server is replaying a layout recall that has already been satisfied.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
2d6cf5ab |
| 21-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Do not set plh_return_seq for non-callback related layoutreturns
In cases where we need to send a layoutreturn in order to propagate an error, we should not tie that to a specific layout state
pNFS: Do not set plh_return_seq for non-callback related layoutreturns
In cases where we need to send a layoutreturn in order to propagate an error, we should not tie that to a specific layout stateid.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
e5fd1904 |
| 21-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Ensure layoutreturn acts as a completion for layout callbacks
When we return NFS_OK to the CB_LAYOUTRECALL, we are required to send a layoutreturn that "completes" that layout recall request,
pNFS: Ensure layoutreturn acts as a completion for layout callbacks
When we return NFS_OK to the CB_LAYOUTRECALL, we are required to send a layoutreturn that "completes" that layout recall request, using the correct stateid.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
ecebb80b |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Always update the layout barrier seqid on LAYOUTGET
Currently, pnfs_set_layout_stateid() will update the layout sequence id barrier only if the stateid itself is newer than the current layout
pNFS: Always update the layout barrier seqid on LAYOUTGET
Currently, pnfs_set_layout_stateid() will update the layout sequence id barrier only if the stateid itself is newer than the current layout stateid. However in a situation where multiple LAYOUTGET calls and a LAYOUTRETURN raced, it is entirely possible for one of the LAYOUTGET to set the current stateid to something newer than the LAYOUTRETURN that needs to set the barrier.
The fix is to allow the "update_barrier" flag to force a check as to whether or not the barrier needs to be updated.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
13bede18 |
| 24-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Always update the layout stateid if NFS_LAYOUT_INVALID_STID is set
If the layout stateid is invalid, then pnfs_set_layout_stateid() must always initialise it.
Signed-off-by: Trond Myklebust <
pNFS: Always update the layout stateid if NFS_LAYOUT_INVALID_STID is set
If the layout stateid is invalid, then pnfs_set_layout_stateid() must always initialise it.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
8e0acf90 |
| 21-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Clear the layout return tracking on layout reinitialisation
Ensure that we don't carry over layoutreturn info from a previous incarnation of this layout.
Signed-off-by: Trond Myklebust <trond
pNFS: Clear the layout return tracking on layout reinitialisation
Ensure that we don't carry over layoutreturn info from a previous incarnation of this layout.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
Revision tags: openbmc-20160722-1 |
|
#
66b53f32 |
| 14-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Handle NFS4ERR_RECALLCONFLICT correctly in LAYOUTGET
Instead of giving up altogether and falling back to doing I/O through the MDS, which may make the situation worse, wait for 2 lease periods
pNFS: Handle NFS4ERR_RECALLCONFLICT correctly in LAYOUTGET
Instead of giving up altogether and falling back to doing I/O through the MDS, which may make the situation worse, wait for 2 lease periods for the callback to resolve itself, and then try destroying the existing layout.
Only if this was an attempt at getting a first layout, do we give up altogether, as the server is clearly crazy.
Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling") Cc: stable@vger.kernel.org # 4.7 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
show more ...
|
#
e85d7ee4 |
| 14-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Separate handling of NFS4ERR_LAYOUTTRYLATER and RECALLCONFLICT
They are not the same error, and need to be handled differently.
Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling")
pNFS: Separate handling of NFS4ERR_LAYOUTTRYLATER and RECALLCONFLICT
They are not the same error, and need to be handled differently.
Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling") Cc: stable@vger.kernel.org # 4.7 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
show more ...
|
#
56b38a1f |
| 14-Jul-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Fix post-layoutget error handling in pnfs_update_layout()
The non-retry error path is currently broken and ends up releasing the reference to the layout twice. It also can end up clearing the
pNFS: Fix post-layoutget error handling in pnfs_update_layout()
The non-retry error path is currently broken and ends up releasing the reference to the layout twice. It also can end up clearing the NFS_LAYOUT_FIRST_LAYOUTGET flag twice, causing a race.
In addition, the retry path will fail to decrement the plh_outstanding counter.
Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling") Cc: stable@vger.kernel.org # 4.7 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
show more ...
|
Revision tags: openbmc-20160713-1, v4.4.15, v4.6.4 |
|
#
2e18d4d8 |
| 26-Jun-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
pNFS: Files and flexfiles always need to commit before layoutcommit
So ensure that we mark the layout for commit once the write is done, and then ensure that the commit to ds is finished before send
pNFS: Files and flexfiles always need to commit before layoutcommit
So ensure that we mark the layout for commit once the write is done, and then ensure that the commit to ds is finished before sending layoutcommit.
Note that by doing this, we're able to optimise away the commit for the case of servers that don't need layoutcommit in order to return updated attributes.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
Revision tags: v4.6.3, v4.4.14 |
|
#
2d148c7e |
| 17-Jun-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4.1/pnfs: Mark the layout stateid invalid when all segments are removed
According to RFC5661, section 12.5.3. the layout stateid is no longer valid once the client no longer holds any layout seg
NFSv4.1/pnfs: Mark the layout stateid invalid when all segments are removed
According to RFC5661, section 12.5.3. the layout stateid is no longer valid once the client no longer holds any layout segments. Ensure that we mark it invalid.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
e5241e43 |
| 17-Jun-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4.1/pnfs: Add sparse lock annotations for pnfs_find_alloc_layout
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by
NFSv4.1/pnfs: Add sparse lock annotations for pnfs_find_alloc_layout
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
67a3b721 |
| 17-Jun-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
NFSv4.1/pnfs: Layout stateids start out as being invalid
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Anna Schum
NFSv4.1/pnfs: Layout stateids start out as being invalid
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
Revision tags: v4.6.2, v4.4.13, openbmc-20160606-1, v4.6.1, v4.4.12 |
|
#
c7d73af2 |
| 25-May-2016 |
Tom Haynes <thomas.haynes@primarydata.com> |
pnfs: pnfs_update_layout needs to consider if strict iomode checking is on
As flexfiles has FF_FLAGS_NO_READ_IO, there is a need to generically support enforcing that a IOMODE_RW segment will not al
pnfs: pnfs_update_layout needs to consider if strict iomode checking is on
As flexfiles has FF_FLAGS_NO_READ_IO, there is a need to generically support enforcing that a IOMODE_RW segment will not allow READ I/O.
Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
Revision tags: openbmc-20160521-1, v4.4.11, openbmc-20160518-1 |
|
#
1b3c6d07 |
| 17-May-2016 |
Jeff Layton <jlayton@poochiereds.net> |
pnfs: make pnfs_layout_process more robust
It can return NULL if layoutgets are blocked currently. Fix it to return -EAGAIN in that case, so we can properly handle it in pnfs_update_layout.
Also, c
pnfs: make pnfs_layout_process more robust
It can return NULL if layoutgets are blocked currently. Fix it to return -EAGAIN in that case, so we can properly handle it in pnfs_update_layout.
Also, clean up and simplify the error handling -- eliminate "status" and just use "lseg".
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
183d9e7b |
| 17-May-2016 |
Jeff Layton <jlayton@poochiereds.net> |
pnfs: rework LAYOUTGET retry handling
There are several problems in the way a stateid is selected for a LAYOUTGET operation:
We pick a stateid to use in the RPC prepare op, but that makes it diffic
pnfs: rework LAYOUTGET retry handling
There are several problems in the way a stateid is selected for a LAYOUTGET operation:
We pick a stateid to use in the RPC prepare op, but that makes it difficult to serialize LAYOUTGETs that use the open stateid. That serialization is done in pnfs_update_layout, which occurs well before the rpc_prepare operation.
Between those two events, the i_lock is dropped and reacquired. pnfs_update_layout can find that the list has lsegs in it and not do any serialization, but then later pnfs_choose_layoutget_stateid ends up choosing the open stateid.
This patch changes the client to select the stateid to use in the LAYOUTGET earlier, when we're searching for a usable layout segment. This way we can do it all while holding the i_lock the first time, and ensure that we serialize any LAYOUTGET call that uses a non-layout stateid.
This also means a rework of how LAYOUTGET replies are handled, as we must now get the latest stateid if we want to retransmit in response to a retryable error.
Most of those errors boil down to the fact that the layout state has changed in some fashion. Thus, what we really want to do is to re-search for a layout when it fails with a retryable error, so that we can avoid reissuing the RPC at all if possible.
While the LAYOUTGET RPC is async, the initiating thread always waits for it to complete, so it's effectively synchronous anyway. Currently, when we need to retry a LAYOUTGET because of an error, we drive that retry via the rpc state machine.
This means that once the call has been submitted, it runs until it completes. So, we must move the error handling for this RPC out of the rpc_call_done operation and into the caller.
In order to handle errors like NFS4ERR_DELAY properly, we must also pass a pointer to the sliding timeout, which is now moved to the stack in pnfs_update_layout.
The complicating errors are -NFS4ERR_RECALLCONFLICT and -NFS4ERR_LAYOUTTRYLATER, as those involve a timeout after which we give up and return NULL back to the caller. So, there is some special handling for those errors to ensure that the layers driving the retries can handle that appropriately.
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
83026d80 |
| 17-May-2016 |
Jeff Layton <jlayton@poochiereds.net> |
pnfs: lift retry logic from send_layoutget to pnfs_update_layout
If we get back something like NFS4ERR_OLD_STATEID, that will be translated into -EAGAIN, and the do/while loop in send_layoutget will
pnfs: lift retry logic from send_layoutget to pnfs_update_layout
If we get back something like NFS4ERR_OLD_STATEID, that will be translated into -EAGAIN, and the do/while loop in send_layoutget will drive the call again.
This is not quite what we want, I think. An error like that is a sign that something has changed. That something could have been a concurrent LAYOUTGET that would give us a usable lseg.
Lift the retry logic into pnfs_update_layout instead. That allows us to redo the layout search, and may spare us from having to issue an RPC.
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|