diff mbox

[1/1] PNFS fix fallback to MDS if got error on commit to DS

Message ID 20170315204240.44221-1-kolga@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Olga Kornievskaia March 15, 2017, 8:42 p.m. UTC
Upon receiving an error on commit to the DS, the code doesn't fallback
to MDS and instead retried to the same DS again.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/filelayout/filelayout.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Olga Kornievskaia March 28, 2017, 1:41 p.m. UTC | #1
On Wed, Mar 15, 2017 at 4:42 PM, Olga Kornievskaia <kolga@netapp.com> wrote:
> Upon receiving an error on commit to the DS, the code doesn't fallback
> to MDS and instead retried to the same DS again.
>
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  fs/nfs/filelayout/filelayout.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
> index e1d9bea..948cb70 100644
> --- a/fs/nfs/filelayout/filelayout.c
> +++ b/fs/nfs/filelayout/filelayout.c
> @@ -382,6 +382,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
>         switch (err) {
>         case -NFS4ERR_RESET_TO_MDS:
>                 pnfs_generic_prepare_to_resend_writes(data);
> +               pnfs_set_lo_fail(data->lseg);
>                 return -EAGAIN;
>         case -EAGAIN:
>                 rpc_restart_call_prepare(task);
> --
> 1.8.3.1
>

Anna, Trond,

Any comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index e1d9bea..948cb70 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -382,6 +382,7 @@  static int filelayout_commit_done_cb(struct rpc_task *task,
 	switch (err) {
 	case -NFS4ERR_RESET_TO_MDS:
 		pnfs_generic_prepare_to_resend_writes(data);
+		pnfs_set_lo_fail(data->lseg);
 		return -EAGAIN;
 	case -EAGAIN:
 		rpc_restart_call_prepare(task);