]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFS: Add a mount option to make ENETUNREACH errors fatal
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 20 Mar 2025 15:45:06 +0000 (11:45 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 21 Mar 2025 16:44:09 +0000 (12:44 -0400)
commit487fae09d7e266a58a13784983cc1ef6a2076526
tree9ee9b10096d795427f936076004b85c229770c6e
parent4c2226be8161a12f0a68e81d25cf8ed05fa622e0
NFS: Add a mount option to make ENETUNREACH errors fatal

If the NFS client was initially created in a container, and that
container is torn down, there is usually no possibity to go back and
destroy any NFS clients that are hung because their virtual network
devices have been unlinked.

Add a flag that tells the NFS client that in these circumstances, it
should treat ENETDOWN and ENETUNREACH errors as fatal to the NFS client.

The option defaults to being on when the mount happens from inside a net
namespace that is not "init_net".

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfs/fs_context.c
fs/nfs/super.c
include/linux/nfs_fs_sb.h