-int llog_init_commit_master(void);
-int llog_cleanup_commit_master(int force);
-
-static inline int opcode_offset(__u32 opc) {
- if (opc < OST_LAST_OPC) {
- /* OST opcode */
- return (opc - OST_FIRST_OPC);
- } else if (opc < MDS_LAST_OPC) {
- /* MDS opcode */
- return (opc - MDS_FIRST_OPC +
- (OST_LAST_OPC - OST_FIRST_OPC));
- } else if (opc < LDLM_LAST_OPC) {
- /* LDLM Opcode */
- return (opc - LDLM_FIRST_OPC +
- (MDS_LAST_OPC - MDS_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) {
- /* OBD Ping */
- return (opc - OBD_FIRST_OPC +
- (MGS_LAST_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 < LLOG_LAST_OPC) {
- /* LLOG opcode */
- return (opc - LLOG_FIRST_OPC +
- (OBD_LAST_OPC - OBD_FIRST_OPC) +
- (MGS_LAST_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 < FLD_LAST_OPC) {
- /* FLD opcode */
- return (opc - FLD_FIRST_OPC +
- (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
- (OBD_LAST_OPC - OBD_FIRST_OPC) +
- (MGS_LAST_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 < SEQ_LAST_OPC) {
- /* SEQ opcode */
- return (opc - SEQ_FIRST_OPC +
- (FLD_LAST_OPC - FLD_FIRST_OPC) +
- (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
- (OBD_LAST_OPC - OBD_FIRST_OPC) +
- (MGS_LAST_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 < SEC_LAST_OPC) {
- /* SEC opcode */
- return (opc - SEC_FIRST_OPC +
- (SEQ_LAST_OPC - SEQ_FIRST_OPC) +
- (FLD_LAST_OPC - FLD_FIRST_OPC) +
- (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
- (OBD_LAST_OPC - OBD_FIRST_OPC) +
- (MGS_LAST_OPC - MGS_FIRST_OPC) +
- (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
- (MDS_LAST_OPC - MDS_FIRST_OPC) +
- (OST_LAST_OPC - OST_FIRST_OPC));
- } else {
- /* Unknown Opcode */
- return -1;
- }
-}