NFS/pNFS: Report EINVAL errors from connect() to the server
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Sep 2023 16:43:58 +0000 (12:43 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 13 Sep 2023 15:51:11 +0000 (11:51 -0400)
With IPv6, connect() can occasionally return EINVAL if a route is
unavailable. If this happens during I/O to a data server, we want to
report it using LAYOUTERROR as an inability to connect.

Fixes: dd52128afdde ("NFSv4.1/pnfs Ensure flexfiles reports all connection related errors")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/flexfilelayout/flexfilelayout.c

index 7deb3cd..a1dc338 100644 (file)
@@ -1235,6 +1235,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
                case -EPFNOSUPPORT:
                case -EPROTONOSUPPORT:
                case -EOPNOTSUPP:
+               case -EINVAL:
                case -ECONNREFUSED:
                case -ECONNRESET:
                case -EHOSTDOWN: