diff mbox series

pnfs: Fix a problem where we gratuitously start doing I/O through the MDS

Message ID 20190718194039.119185-1-trond.myklebust@hammerspace.com (mailing list archive)
State New, archived
Headers show
Series pnfs: Fix a problem where we gratuitously start doing I/O through the MDS | expand

Commit Message

Trond Myklebust July 18, 2019, 7:40 p.m. UTC
If the client has to stop in pnfs_update_layout() to wait for another
layoutget to complete, it currently exits and defaults to I/O through
the MDS if the layoutget was successful.

Fixes: d03360aaf5cc ("pNFS: Ensure we return the error if someone kills...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.20+
---
 fs/nfs/pnfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sasha Levin July 19, 2019, 12:45 a.m. UTC | #1
Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: d03360aaf5cc pNFS: Ensure we return the error if someone kills a waiting layoutget.

The bot has tested the following trees: v5.2.1, v5.1.18, v4.19.59.

v5.2.1: Build OK!
v5.1.18: Build OK!
v4.19.59: Failed to apply! Possible dependencies:
    400417b05f3e ("pNFS: Fix a typo in pnfs_update_layout")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

--
Thanks,
Sasha
Trond Myklebust July 19, 2019, 12:54 a.m. UTC | #2
Hi Sasha,

On Fri, 2019-07-19 at 00:45 +0000, Sasha Levin wrote:
> Hi,
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: d03360aaf5cc pNFS: Ensure we return the error if
> someone kills a waiting layoutget.
> 
> The bot has tested the following trees: v5.2.1, v5.1.18, v4.19.59.
> 
> v5.2.1: Build OK!
> v5.1.18: Build OK!
> v4.19.59: Failed to apply! Possible dependencies:
>     400417b05f3e ("pNFS: Fix a typo in pnfs_update_layout")
> 
> 
> NOTE: The patch will not be queued to stable trees until it is
> upstream.
> 
> How should we proceed with this patch?
> 

Please apply both patches.
i.e. Please apply

400417b05f3e ("pNFS: Fix a typo in pnfs_update_layout")
58bbeab425c6 ("pnfs: Fix a problem where we gratuitously start doing
I/O through the MDS")

Thanks
  Trond
Greg KH July 23, 2019, 9:57 a.m. UTC | #3
On Thu, Jul 18, 2019 at 08:54:53PM -0400, Trond Myklebust wrote:
> Hi Sasha,
> 
> On Fri, 2019-07-19 at 00:45 +0000, Sasha Levin wrote:
> > Hi,
> > 
> > [This is an automated email]
> > 
> > This commit has been processed because it contains a "Fixes:" tag,
> > fixing commit: d03360aaf5cc pNFS: Ensure we return the error if
> > someone kills a waiting layoutget.
> > 
> > The bot has tested the following trees: v5.2.1, v5.1.18, v4.19.59.
> > 
> > v5.2.1: Build OK!
> > v5.1.18: Build OK!
> > v4.19.59: Failed to apply! Possible dependencies:
> >     400417b05f3e ("pNFS: Fix a typo in pnfs_update_layout")
> > 
> > 
> > NOTE: The patch will not be queued to stable trees until it is
> > upstream.
> > 
> > How should we proceed with this patch?
> > 
> 
> Please apply both patches.
> i.e. Please apply
> 
> 400417b05f3e ("pNFS: Fix a typo in pnfs_update_layout")
> 58bbeab425c6 ("pnfs: Fix a problem where we gratuitously start doing
> I/O through the MDS")

Now done, thanks.

greg k-h
diff mbox series

Patch

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 5b9145c62fd9..758917463700 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1890,7 +1890,7 @@  pnfs_update_layout(struct inode *ino,
 		spin_unlock(&ino->i_lock);
 		lseg = ERR_PTR(wait_var_event_killable(&lo->plh_outstanding,
 					!atomic_read(&lo->plh_outstanding)));
-		if (IS_ERR(lseg) || !list_empty(&lo->plh_segs))
+		if (IS_ERR(lseg))
 			goto out_put_layout_hdr;
 		pnfs_put_layout_hdr(lo);
 		goto lookup_again;