Skip to content

Commit 62fdf67

Browse files
longlimsftsmfrench
authored andcommitted
cifs: smbd: Indicate to retry on transport sending failure
Failure to send a packet doesn't mean it's a permanent failure, it can't be returned to user process. This I/O should be retried or failed based on server packet response and transport health. This logic is handled by the upper layer. Give this decision to upper layer. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 98e0d40 commit 62fdf67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/cifs/smbdirect.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ static int smbd_create_header(struct smbd_connection *info,
853853

854854
if (info->transport_status != SMBD_CONNECTED) {
855855
log_outgoing(ERR, "disconnected not sending\n");
856-
return -ENOENT;
856+
return -EAGAIN;
857857
}
858858
atomic_dec(&info->send_credits);
859859

@@ -979,6 +979,7 @@ static int smbd_post_send(struct smbd_connection *info,
979979
wake_up(&info->wait_send_pending);
980980
}
981981
smbd_disconnect_rdma_connection(info);
982+
rc = -EAGAIN;
982983
} else
983984
/* Reset timer for idle connection after packet is sent */
984985
mod_delayed_work(info->workqueue, &info->idle_timer_work,
@@ -2085,7 +2086,7 @@ int smbd_send(struct TCP_Server_Info *server, struct smb_rqst *rqst)
20852086
int rc;
20862087

20872088
if (info->transport_status != SMBD_CONNECTED) {
2088-
rc = -ENODEV;
2089+
rc = -EAGAIN;
20892090
goto done;
20902091
}
20912092

0 commit comments

Comments
 (0)