Re: [PATCH v3 10/13] pnfs: fix bad error handling in send_layoutget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5/14/16, 21:06, "Jeff Layton" <jlayton@xxxxxxxxxxxxxxx> wrote:

>Currently, the code will clear the fail bit if we get back a fatal
>error. I don't think that's correct -- we only want to clear that
>bit if the layoutget succeeds.
>
>Fixes: 0bcbf039f6 (nfs: handle request add failure properly)
>Signed-off-by: Jeff Layton <jeff.layton@xxxxxxxxxxxxxxx>
>---
> fs/nfs/pnfs.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
>diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
>index e6cad5ee5d29..5f6ed295acb5 100644
>--- a/fs/nfs/pnfs.c
>+++ b/fs/nfs/pnfs.c
>@@ -876,11 +876,13 @@ send_layoutget(struct pnfs_layout_hdr *lo,
> 		lseg = nfs4_proc_layoutget(lgp, gfp_flags);
> 	} while (lseg == ERR_PTR(-EAGAIN));
> 
>-	if (IS_ERR(lseg) && !nfs_error_is_fatal(PTR_ERR(lseg)))
>-		lseg = NULL;
>-	else
>+	if (IS_ERR(lseg)) {
>+		if (!nfs_error_is_fatal(PTR_ERR(lseg)))
>+			lseg = NULL;
>+	} else {
> 		pnfs_layout_clear_fail_bit(lo,
> 				pnfs_iomode_to_fail_bit(range->iomode));
>+	}

No… The intention was indeed that we clear the fail bit in all cases except fatal errors. Otherwise, the client won’t attempt another layoutget.



��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux