]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.46/pnfs-fallback-to-mds-if-no-deviceid-found.patch
Linux 5.0.19
[thirdparty/kernel/stable-queue.git] / releases / 4.19.46 / pnfs-fallback-to-mds-if-no-deviceid-found.patch
1 From b1029c9bc078a6f1515f55dd993b507dcc7e3440 Mon Sep 17 00:00:00 2001
2 From: Olga Kornievskaia <kolga@netapp.com>
3 Date: Tue, 7 May 2019 13:41:49 -0400
4 Subject: PNFS fallback to MDS if no deviceid found
5
6 From: Olga Kornievskaia <kolga@netapp.com>
7
8 commit b1029c9bc078a6f1515f55dd993b507dcc7e3440 upstream.
9
10 If we fail to find a good deviceid while trying to pnfs instead of
11 propogating an error back fallback to doing IO to the MDS. Currently,
12 code with fals the IO with EINVAL.
13
14 Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
15 Fixes: 8d40b0f14846f ("NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes"
16 Cc: stable@vger.kernel.org # v4.11+
17 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20 ---
21 fs/nfs/filelayout/filelayout.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/fs/nfs/filelayout/filelayout.c
25 +++ b/fs/nfs/filelayout/filelayout.c
26 @@ -904,7 +904,7 @@ fl_pnfs_update_layout(struct inode *ino,
27 status = filelayout_check_deviceid(lo, fl, gfp_flags);
28 if (status) {
29 pnfs_put_lseg(lseg);
30 - lseg = ERR_PTR(status);
31 + lseg = NULL;
32 }
33 out:
34 return lseg;