Skip to content

Commit 2d7f844

Browse files
author
Trond Myklebust
committed
NFSv4: Handle fatal ENETDOWN and ENETUNREACH errors
Ensure that the NFSv4 error handling code recognises the RPC_TASK_NETUNREACH_FATAL flag, and handles the ENETDOWN and ENETUNREACH errors accordingly. Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Jeff Layton <[email protected]>
1 parent b443265 commit 2d7f844

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,15 @@ nfs4_async_handle_exception(struct rpc_task *task, struct nfs_server *server,
671671
struct nfs_client *clp = server->nfs_client;
672672
int ret;
673673

674+
if ((task->tk_rpc_status == -ENETDOWN ||
675+
task->tk_rpc_status == -ENETUNREACH) &&
676+
task->tk_flags & RPC_TASK_NETUNREACH_FATAL) {
677+
exception->delay = 0;
678+
exception->recovering = 0;
679+
exception->retry = 0;
680+
return -EIO;
681+
}
682+
674683
ret = nfs4_do_handle_exception(server, errorcode, exception);
675684
if (exception->delay) {
676685
int ret2 = nfs4_exception_should_retrans(server, exception);

0 commit comments

Comments
 (0)