linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS
@ 2017-03-15 20:42 Olga Kornievskaia
  2017-03-28 13:41 ` Olga Kornievskaia
  0 siblings, 1 reply; 5+ messages in thread
From: Olga Kornievskaia @ 2017-03-15 20:42 UTC (permalink / raw)
  To: Trond.Myklebust, anna.schumaker; +Cc: linux-nfs

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS
  2017-03-15 20:42 [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS Olga Kornievskaia
@ 2017-03-28 13:41 ` Olga Kornievskaia
  2017-03-30 14:10   ` Olga Kornievskaia
  0 siblings, 1 reply; 5+ messages in thread
From: Olga Kornievskaia @ 2017-03-28 13:41 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Trond Myklebust, Anna Schumaker, linux-nfs

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS
  2017-03-28 13:41 ` Olga Kornievskaia
@ 2017-03-30 14:10   ` Olga Kornievskaia
  2017-03-30 17:34     ` Anna Schumaker
  0 siblings, 1 reply; 5+ messages in thread
From: Olga Kornievskaia @ 2017-03-30 14:10 UTC (permalink / raw)
  To: Trond.Myklebust, anna.schumaker; +Cc: linux-nfs

Upong receiving some errors (EACCES) on commit to the DS the code
doesn't fallback to MDS and intead retrieds to the same DS again.

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

diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index a3fc48b..59e1efa 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -202,10 +202,10 @@ static int filelayout_async_handle_error(struct rpc_task *task,
 			task->tk_status);
 		nfs4_mark_deviceid_unavailable(devid);
 		pnfs_error_mark_layout_for_return(inode, lseg);
-		pnfs_set_lo_fail(lseg);
 		rpc_wake_up(&tbl->slot_tbl_waitq);
 		/* fall through */
 	default:
+		pnfs_set_lo_fail(lseg);
 reset:
 		dprintk("%s Retry through MDS. Error %d\n", __func__,
 			task->tk_status);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS
  2017-03-30 14:10   ` Olga Kornievskaia
@ 2017-03-30 17:34     ` Anna Schumaker
  2017-03-30 17:59       ` Olga Kornievskaia
  0 siblings, 1 reply; 5+ messages in thread
From: Anna Schumaker @ 2017-03-30 17:34 UTC (permalink / raw)
  To: Olga Kornievskaia, Trond.Myklebust, anna.schumaker; +Cc: linux-nfs

Hi Olga,

On 03/30/2017 10:10 AM, Olga Kornievskaia wrote:
> Upong receiving some errors (EACCES) on commit to the DS the code
> doesn't fallback to MDS and intead retrieds to the same DS again.

Just so I know what's going on: do you want this patch instead of the first one in the thread?

Thanks,
Anna
> 
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  fs/nfs/filelayout/filelayout.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
> index a3fc48b..59e1efa 100644
> --- a/fs/nfs/filelayout/filelayout.c
> +++ b/fs/nfs/filelayout/filelayout.c
> @@ -202,10 +202,10 @@ static int filelayout_async_handle_error(struct rpc_task *task,
>  			task->tk_status);
>  		nfs4_mark_deviceid_unavailable(devid);
>  		pnfs_error_mark_layout_for_return(inode, lseg);
> -		pnfs_set_lo_fail(lseg);
>  		rpc_wake_up(&tbl->slot_tbl_waitq);
>  		/* fall through */
>  	default:
> +		pnfs_set_lo_fail(lseg);
>  reset:
>  		dprintk("%s Retry through MDS. Error %d\n", __func__,
>  			task->tk_status);
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS
  2017-03-30 17:34     ` Anna Schumaker
@ 2017-03-30 17:59       ` Olga Kornievskaia
  0 siblings, 0 replies; 5+ messages in thread
From: Olga Kornievskaia @ 2017-03-30 17:59 UTC (permalink / raw)
  To: Anna Schumaker
  Cc: Olga Kornievskaia, Trond Myklebust, Anna Schumaker, linux-nfs

On Thu, Mar 30, 2017 at 1:34 PM, Anna Schumaker
<schumaker.anna@gmail.com> wrote:
> Hi Olga,
>
> On 03/30/2017 10:10 AM, Olga Kornievskaia wrote:
>> Upong receiving some errors (EACCES) on commit to the DS the code
>> doesn't fallback to MDS and intead retrieds to the same DS again.
>
> Just so I know what's going on: do you want this patch instead of the first one in the thread?

Yes I do. I think this might be more correct. The previous patch would
call pnfs_set_lo_fail() twice for the "rpc connection errors from ds"
in file layout_async_handle_error() function. Also I think other
callers of filelayout_async_handle_error() (like read and write) when
they get these unhandled errors (like EACCES) would also benefit from
it caz otherwise they would also resend to the DS instead of MDS (but
I have not tested this case with EACCES and IO).

But what I would have liked a comment on is whether or not
pnfs_error_mark_layout_for_return() needs to be moved lower to?

>
> Thanks,
> Anna
>>
>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>> ---
>>  fs/nfs/filelayout/filelayout.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
>> index a3fc48b..59e1efa 100644
>> --- a/fs/nfs/filelayout/filelayout.c
>> +++ b/fs/nfs/filelayout/filelayout.c
>> @@ -202,10 +202,10 @@ static int filelayout_async_handle_error(struct rpc_task *task,
>>                       task->tk_status);
>>               nfs4_mark_deviceid_unavailable(devid);
>>               pnfs_error_mark_layout_for_return(inode, lseg);
>> -             pnfs_set_lo_fail(lseg);
>>               rpc_wake_up(&tbl->slot_tbl_waitq);
>>               /* fall through */
>>       default:
>> +             pnfs_set_lo_fail(lseg);
>>  reset:
>>               dprintk("%s Retry through MDS. Error %d\n", __func__,
>>                       task->tk_status);
>>
> --
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-30 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 20:42 [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS Olga Kornievskaia
2017-03-28 13:41 ` Olga Kornievskaia
2017-03-30 14:10   ` Olga Kornievskaia
2017-03-30 17:34     ` Anna Schumaker
2017-03-30 17:59       ` Olga Kornievskaia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).