All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "nfs41: do not return ENOMEM on LAYOUTUNAVAILABLE" has been added to the 4.14-stable tree
@ 2018-02-14 14:25 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-14 14:25 UTC (permalink / raw)
  To: tigran.mkrtchyan, gregkh, trond.myklebust; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    nfs41: do not return ENOMEM on LAYOUTUNAVAILABLE

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfs41-do-not-return-enomem-on-layoutunavailable.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 7ff4cff637aa0bd2abbd81f53b2a6206c50afd95 Mon Sep 17 00:00:00 2001
From: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Date: Tue, 16 Jan 2018 22:38:50 +0100
Subject: nfs41: do not return ENOMEM on LAYOUTUNAVAILABLE

From: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>

commit 7ff4cff637aa0bd2abbd81f53b2a6206c50afd95 upstream.

A pNFS server may return LAYOUTUNAVAILABLE error on LAYOUTGET for files
which don't have any layout. In this situation pnfs_update_layout
currently returns NULL. As this NULL is converted into ENOMEM, IO
requests fails instead of falling back to MDS.

Do not return ENOMEM on LAYOUTUNAVAILABLE and let client retry through
MDS.

Fixes 8d40b0f14846f. I will suggest to backport this fix to affected
stable branches.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
[trondmy: Use IS_ERR_OR_NULL()]
Fixes: 8d40b0f14846 ("NFS filelayout:call GETDEVICEINFO after...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/filelayout/filelayout.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -895,9 +895,7 @@ fl_pnfs_update_layout(struct inode *ino,
 
 	lseg = pnfs_update_layout(ino, ctx, pos, count, iomode, strict_iomode,
 				  gfp_flags);
-	if (!lseg)
-		lseg = ERR_PTR(-ENOMEM);
-	if (IS_ERR(lseg))
+	if (IS_ERR_OR_NULL(lseg))
 		goto out;
 
 	lo = NFS_I(ino)->layout;


Patches currently in stable-queue which might be from tigran.mkrtchyan@desy.de are

queue-4.14/nfs41-do-not-return-enomem-on-layoutunavailable.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-14 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 14:25 Patch "nfs41: do not return ENOMEM on LAYOUTUNAVAILABLE" has been added to the 4.14-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.