Skip to content
Snippets Groups Projects
Commit a119255d authored by Vitaly Fertman's avatar Vitaly Fertman
Browse files

Branch b1_6

b=12731
i=adilger
i=green

ASSERTION(offset < LUSTRE_MAX_OPCODES) fix
parent 19b76b28
No related branches found
No related tags found
No related merge requests found
...@@ -1079,6 +1079,7 @@ typedef enum { ...@@ -1079,6 +1079,7 @@ typedef enum {
MGS_TARGET_DEL, MGS_TARGET_DEL,
MGS_LAST_OPC MGS_LAST_OPC
} mgs_cmd_t; } mgs_cmd_t;
#define MGS_FIRST_OPC MGS_CONNECT
/* We pass this info to the MGS so it can write config logs */ /* We pass this info to the MGS so it can write config logs */
#define MTI_NAME_MAXLEN 64 #define MTI_NAME_MAXLEN 64
......
...@@ -85,6 +85,11 @@ struct ll_rpc_opcode { ...@@ -85,6 +85,11 @@ struct ll_rpc_opcode {
{ LDLM_BL_CALLBACK, "ldlm_bl_callback" }, { LDLM_BL_CALLBACK, "ldlm_bl_callback" },
{ LDLM_CP_CALLBACK, "ldlm_cp_callback" }, { LDLM_CP_CALLBACK, "ldlm_cp_callback" },
{ LDLM_GL_CALLBACK, "ldlm_gl_callback" }, { LDLM_GL_CALLBACK, "ldlm_gl_callback" },
{ MGS_CONNECT, "mgs_connect" },
{ MGS_DISCONNECT, "mgs_disconnect" },
{ MGS_EXCEPTION, "mgs_exception" },
{ MGS_TARGET_REG, "mgs_target_reg" },
{ MGS_TARGET_DEL, "mgs_target_del" },
{ OBD_PING, "obd_ping" }, { OBD_PING, "obd_ping" },
{ OBD_LOG_CANCEL, "llog_origin_handle_cancel"}, { OBD_LOG_CANCEL, "llog_origin_handle_cancel"},
}; };
......
...@@ -79,9 +79,16 @@ static inline int opcode_offset(__u32 opc) { ...@@ -79,9 +79,16 @@ static inline int opcode_offset(__u32 opc) {
return (opc - LDLM_FIRST_OPC + return (opc - LDLM_FIRST_OPC +
(MDS_LAST_OPC - MDS_FIRST_OPC) + (MDS_LAST_OPC - MDS_FIRST_OPC) +
(OST_LAST_OPC - OST_FIRST_OPC)); (OST_LAST_OPC - OST_FIRST_OPC));
} else if (opc < MGS_LAST_OPC) {
/* MGS Opcode */
return (opc - MGS_FIRST_OPC +
(LDLM_LAST_OPC - LDLM_FIRST_OPC) +
(MDS_LAST_OPC - MDS_FIRST_OPC) +
(OST_LAST_OPC - OST_FIRST_OPC));
} else if (opc < OBD_LAST_OPC) { } else if (opc < OBD_LAST_OPC) {
/* OBD Ping */ /* OBD Ping */
return (opc - OBD_FIRST_OPC + return (opc - OBD_FIRST_OPC +
(MGS_LAST_OPC - MGS_FIRST_OPC) +
(LDLM_LAST_OPC - LDLM_FIRST_OPC) + (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
(MDS_LAST_OPC - MDS_FIRST_OPC) + (MDS_LAST_OPC - MDS_FIRST_OPC) +
(OST_LAST_OPC - OST_FIRST_OPC)); (OST_LAST_OPC - OST_FIRST_OPC));
...@@ -94,7 +101,8 @@ static inline int opcode_offset(__u32 opc) { ...@@ -94,7 +101,8 @@ static inline int opcode_offset(__u32 opc) {
#define LUSTRE_MAX_OPCODES ((LDLM_LAST_OPC - LDLM_FIRST_OPC) + \ #define LUSTRE_MAX_OPCODES ((LDLM_LAST_OPC - LDLM_FIRST_OPC) + \
(MDS_LAST_OPC - MDS_FIRST_OPC) + \ (MDS_LAST_OPC - MDS_FIRST_OPC) + \
(OST_LAST_OPC - OST_FIRST_OPC) + \ (OST_LAST_OPC - OST_FIRST_OPC) + \
(OBD_LAST_OPC - OBD_FIRST_OPC)) (OBD_LAST_OPC - OBD_FIRST_OPC) + \
(MGS_LAST_OPC - MGS_FIRST_OPC))
enum { enum {
PTLRPC_REQWAIT_CNTR = 0, PTLRPC_REQWAIT_CNTR = 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment