Skip to content

Commit 7f73852

Browse files
sprasad-microsoftsmfrench
authored andcommitted
cifs: new nt status codes from MS-SMB2
MS-SMB2 spec has introduced two new status codes, STATUS_SERVER_UNAVAILABLE and STATUS_FILE_NOT_AVAILABLE which are to be treated as retryable errors. This change adds these to the available mappings and maps them to Linux errno EAGAIN. Signed-off-by: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 268b8b5 commit 7f73852

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fs/smb/client/smb2maperror.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
12101210
{STATUS_INVALID_TASK_INDEX, -EIO, "STATUS_INVALID_TASK_INDEX"},
12111211
{STATUS_THREAD_ALREADY_IN_TASK, -EIO, "STATUS_THREAD_ALREADY_IN_TASK"},
12121212
{STATUS_CALLBACK_BYPASS, -EIO, "STATUS_CALLBACK_BYPASS"},
1213+
{STATUS_SERVER_UNAVAILABLE, -EAGAIN, "STATUS_SERVER_UNAVAILABLE"},
1214+
{STATUS_FILE_NOT_AVAILABLE, -EAGAIN, "STATUS_FILE_NOT_AVAILABLE"},
12131215
{STATUS_PORT_CLOSED, -EIO, "STATUS_PORT_CLOSED"},
12141216
{STATUS_MESSAGE_LOST, -EIO, "STATUS_MESSAGE_LOST"},
12151217
{STATUS_INVALID_MESSAGE, -EIO, "STATUS_INVALID_MESSAGE"},

fs/smb/client/smb2status.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ struct ntstatus {
982982
#define STATUS_INVALID_TASK_INDEX cpu_to_le32(0xC0000501)
983983
#define STATUS_THREAD_ALREADY_IN_TASK cpu_to_le32(0xC0000502)
984984
#define STATUS_CALLBACK_BYPASS cpu_to_le32(0xC0000503)
985+
#define STATUS_SERVER_UNAVAILABLE cpu_to_le32(0xC0000466)
986+
#define STATUS_FILE_NOT_AVAILABLE cpu_to_le32(0xC0000467)
985987
#define STATUS_PORT_CLOSED cpu_to_le32(0xC0000700)
986988
#define STATUS_MESSAGE_LOST cpu_to_le32(0xC0000701)
987989
#define STATUS_INVALID_MESSAGE cpu_to_le32(0xC0000702)

0 commit comments

Comments
 (0)