diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-14 16:25:11 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-28 14:32:40 -0500 |
commit | 2e5b29f0448be9ea8da3ee0412a2043fee59e131 (patch) | |
tree | bba96a3ec2ae66890652f52552aeab9472824950 /fs/nfs/flexfilelayout/flexfilelayoutdev.c | |
parent | 141b9b59ed8ae2602b2c285149ec8d4f6b05c4d9 (diff) |
pNFS/flexfiles: Don't prevent flexfiles client from retrying LAYOUTGET
Fix a bug in which flexfiles clients are falling back to I/O through the
MDS even when the FF_FLAGS_NO_IO_THRU_MDS flag is set.
The flexfiles client will always report errors through the LAYOUTRETURN
and/or LAYOUTERROR mechanisms, so it should normally be safe for it
to retry the LAYOUTGET until it fails or succeeds.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index e125e55de86d..bd0327541366 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c | |||
@@ -429,22 +429,14 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx, | |||
429 | mirror, lseg->pls_range.offset, | 429 | mirror, lseg->pls_range.offset, |
430 | lseg->pls_range.length, NFS4ERR_NXIO, | 430 | lseg->pls_range.length, NFS4ERR_NXIO, |
431 | OP_ILLEGAL, GFP_NOIO); | 431 | OP_ILLEGAL, GFP_NOIO); |
432 | if (fail_return) { | 432 | if (!fail_return) { |
433 | pnfs_error_mark_layout_for_return(ino, lseg); | ||
434 | if (ff_layout_has_available_ds(lseg)) | ||
435 | pnfs_set_retry_layoutget(lseg->pls_layout); | ||
436 | else | ||
437 | pnfs_clear_retry_layoutget(lseg->pls_layout); | ||
438 | |||
439 | } else { | ||
440 | if (ff_layout_has_available_ds(lseg)) | 433 | if (ff_layout_has_available_ds(lseg)) |
441 | set_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE, | 434 | set_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE, |
442 | &lseg->pls_layout->plh_flags); | 435 | &lseg->pls_layout->plh_flags); |
443 | else { | 436 | else |
444 | pnfs_error_mark_layout_for_return(ino, lseg); | 437 | pnfs_error_mark_layout_for_return(ino, lseg); |
445 | pnfs_clear_retry_layoutget(lseg->pls_layout); | 438 | } else |
446 | } | 439 | pnfs_error_mark_layout_for_return(ino, lseg); |
447 | } | ||
448 | } | 440 | } |
449 | out_update_creds: | 441 | out_update_creds: |
450 | if (ff_layout_update_mirror_cred(mirror, ds)) | 442 | if (ff_layout_update_mirror_cred(mirror, ds)) |