From 43e84cbd3801d588f736222aae4b89069830552f Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 2 Apr 2022 23:45:28 +0800 Subject: [PATCH] rename files --- source/dnode/mgmt/bm/bmHandle.c | 2 +- source/dnode/mgmt/bm/bmInt.c | 2 +- source/dnode/mgmt/dm/dmHandle.c | 28 ++++++++++++++-------------- source/dnode/mgmt/dm/dmWorker.c | 6 +++--- source/dnode/mgmt/inc/bmInt.h | 4 ++-- source/dnode/mgmt/inc/dmInt.h | 6 +++--- source/dnode/mgmt/inc/dndInt.h | 6 +++--- source/dnode/mgmt/inc/mmInt.h | 4 ++-- source/dnode/mgmt/inc/qmInt.h | 4 ++-- source/dnode/mgmt/inc/smInt.h | 4 ++-- source/dnode/mgmt/inc/vmInt.h | 4 ++-- source/dnode/mgmt/mm/mmHandle.c | 2 +- source/dnode/mgmt/mm/mmInt.c | 2 +- source/dnode/mgmt/qm/qmHandle.c | 2 +- source/dnode/mgmt/qm/qmInt.c | 2 +- source/dnode/mgmt/sm/smHandle.c | 2 +- source/dnode/mgmt/sm/smInt.c | 2 +- source/dnode/mgmt/vm/vmHandle.c | 2 +- source/dnode/mgmt/vm/vmInt.c | 2 +- 19 files changed, 43 insertions(+), 43 deletions(-) diff --git a/source/dnode/mgmt/bm/bmHandle.c b/source/dnode/mgmt/bm/bmHandle.c index c01d260c3f..2ae9b3817f 100644 --- a/source/dnode/mgmt/bm/bmHandle.c +++ b/source/dnode/mgmt/bm/bmHandle.c @@ -54,4 +54,4 @@ int32_t bmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { } } -void bmInitMsgHandles(SMgmtWrapper *pWrapper) {} +void bmInitMsgHandle(SMgmtWrapper *pWrapper) {} diff --git a/source/dnode/mgmt/bm/bmInt.c b/source/dnode/mgmt/bm/bmInt.c index 2cb0f50dfe..990c7873a9 100644 --- a/source/dnode/mgmt/bm/bmInt.c +++ b/source/dnode/mgmt/bm/bmInt.c @@ -117,7 +117,7 @@ void bmSetMgmtFp(SMgmtWrapper *pWrapper) { mgmtFp.dropMsgFp = bmProcessDropReq; mgmtFp.requiredFp = bmRequire; - bmInitMsgHandles(pWrapper); + bmInitMsgHandle(pWrapper); pWrapper->name = "bnode"; pWrapper->fp = mgmtFp; } diff --git a/source/dnode/mgmt/dm/dmHandle.c b/source/dnode/mgmt/dm/dmHandle.c index 7b0ac353c4..7d627e5870 100644 --- a/source/dnode/mgmt/dm/dmHandle.c +++ b/source/dnode/mgmt/dm/dmHandle.c @@ -171,7 +171,7 @@ static int32_t dmProcessDropNodeMsg(SDnode *pDnode, ENodeType ntype, SNodeMsg *p return code; } -int32_t dmProcessCDnodeMsg(SDnode *pDnode, SNodeMsg *pMsg) { +int32_t dmProcessCDnodeReq(SDnode *pDnode, SNodeMsg *pMsg) { switch (pMsg->rpcMsg.msgType) { case TDMT_DND_CREATE_MNODE: return dmProcessCreateNodeMsg(pDnode, MNODE, pMsg); @@ -197,19 +197,19 @@ int32_t dmProcessCDnodeMsg(SDnode *pDnode, SNodeMsg *pMsg) { void dmInitMsgHandle(SMgmtWrapper *pWrapper) { // Requests handled by DNODE - dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_MNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_DROP_MNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_QNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_DROP_QNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_SNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_DROP_SNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_BNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_DROP_BNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_CONFIG_DNODE, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_DND_NETWORK_TEST, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_MNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_DROP_MNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_QNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_DROP_QNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_SNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_DROP_SNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_BNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_DROP_BNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_CONFIG_DNODE, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_DND_NETWORK_TEST, dmProcessMgmtMsg, DEFAULT_HANDLE); // Requests handled by MNODE - dndSetMsgHandle(pWrapper, TDMT_MND_STATUS_RSP, dmPutMsgToStatusWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_MND_GRANT_RSP, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); - dndSetMsgHandle(pWrapper, TDMT_MND_AUTH_RSP, dmPutMsgToMgmtWorker, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_MND_STATUS_RSP, dmProcessStatusMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_MND_GRANT_RSP, dmProcessMgmtMsg, DEFAULT_HANDLE); + dndSetMsgHandle(pWrapper, TDMT_MND_AUTH_RSP, dmProcessMgmtMsg, DEFAULT_HANDLE); } diff --git a/source/dnode/mgmt/dm/dmWorker.c b/source/dnode/mgmt/dm/dmWorker.c index e43b1c81c2..ec7392d7e4 100644 --- a/source/dnode/mgmt/dm/dmWorker.c +++ b/source/dnode/mgmt/dm/dmWorker.c @@ -79,7 +79,7 @@ static void dmProcessQueue(SQueueInfo *pInfo, SNodeMsg *pMsg) { code = dmProcessGrantRsp(pMgmt, pMsg); break; default: - code = dmProcessCDnodeMsg(pMgmt->pDnode, pMsg); + code = dmProcessCDnodeReq(pMgmt->pDnode, pMsg); break; } @@ -122,7 +122,7 @@ void dmStopWorker(SDnodeMgmt *pMgmt) { dDebug("dnode workers are closed"); } -int32_t dmPutMsgToMgmtWorker(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { +int32_t dmProcessMgmtMsg(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { SDnodeMgmt *pMgmt = pWrapper->pMgmt; SSingleWorker *pWorker = &pMgmt->mgmtWorker; @@ -131,7 +131,7 @@ int32_t dmPutMsgToMgmtWorker(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { return 0; } -int32_t dmPutMsgToStatusWorker(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { +int32_t dmProcessStatusMsg(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { SDnodeMgmt *pMgmt = pWrapper->pMgmt; SSingleWorker *pWorker = &pMgmt->statusWorker; diff --git a/source/dnode/mgmt/inc/bmInt.h b/source/dnode/mgmt/inc/bmInt.h index 140882a9e7..919b1d2c7c 100644 --- a/source/dnode/mgmt/inc/bmInt.h +++ b/source/dnode/mgmt/inc/bmInt.h @@ -35,8 +35,8 @@ typedef struct SBnodeMgmt { int32_t bmOpen(SMgmtWrapper *pWrapper); int32_t bmDrop(SMgmtWrapper *pWrapper); -// bmMsg.c -void bmInitMsgHandles(SMgmtWrapper *pWrapper); +// bmHandle.c +void bmInitMsgHandle(SMgmtWrapper *pWrapper); int32_t bmProcessCreateReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); int32_t bmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); diff --git a/source/dnode/mgmt/inc/dmInt.h b/source/dnode/mgmt/inc/dmInt.h index afc48b520c..5dcd1be47c 100644 --- a/source/dnode/mgmt/inc/dmInt.h +++ b/source/dnode/mgmt/inc/dmInt.h @@ -51,7 +51,7 @@ int32_t dmProcessConfigReq(SDnodeMgmt *pMgmt, SNodeMsg *pMsg); int32_t dmProcessStatusRsp(SDnodeMgmt *pMgmt, SNodeMsg *pMsg); int32_t dmProcessAuthRsp(SDnodeMgmt *pMgmt, SNodeMsg *pMsg); int32_t dmProcessGrantRsp(SDnodeMgmt *pMgmt, SNodeMsg *pMsg); -int32_t dmProcessCDnodeMsg(SDnode *pDnode, SNodeMsg *pMsg); +int32_t dmProcessCDnodeReq(SDnode *pDnode, SNodeMsg *pMsg); // dmMonitor.c void dmSendMonitorReport(SDnode *pDnode); @@ -60,8 +60,8 @@ void dmSendMonitorReport(SDnode *pDnode); int32_t dmStartThread(SDnodeMgmt *pMgmt); int32_t dmStartWorker(SDnodeMgmt *pMgmt); void dmStopWorker(SDnodeMgmt *pMgmt); -int32_t dmPutMsgToMgmtWorker(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); -int32_t dmPutMsgToStatusWorker(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); +int32_t dmProcessMgmtMsg(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); +int32_t dmProcessStatusMsg(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); #ifdef __cplusplus } diff --git a/source/dnode/mgmt/inc/dndInt.h b/source/dnode/mgmt/inc/dndInt.h index 963d3ee5e5..20e61c43dd 100644 --- a/source/dnode/mgmt/inc/dndInt.h +++ b/source/dnode/mgmt/inc/dndInt.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_DND_H_ -#define _TD_DND_H_ +#ifndef _TD_DND_INT_H_ +#define _TD_DND_INT_H_ #include "os.h" @@ -203,4 +203,4 @@ int32_t mmMonitorMnodeInfo(SMgmtWrapper *pWrapper, SMonClusterInfo *pClusterInfo } #endif -#endif /*_TD_DND_H_*/ \ No newline at end of file +#endif /*_TD_DND_INT_H_*/ \ No newline at end of file diff --git a/source/dnode/mgmt/inc/mmInt.h b/source/dnode/mgmt/inc/mmInt.h index 4a7ab05de7..d09d15255d 100644 --- a/source/dnode/mgmt/inc/mmInt.h +++ b/source/dnode/mgmt/inc/mmInt.h @@ -46,8 +46,8 @@ int32_t mmOpenFromMsg(SMgmtWrapper *pWrapper, SDCreateMnodeReq *pReq); int32_t mmDrop(SMgmtWrapper *pWrapper); int32_t mmAlter(SMnodeMgmt *pMgmt, SDAlterMnodeReq *pReq); -// mmMsg.c -void mmInitMsgHandles(SMgmtWrapper *pWrapper); +// mmHandle.c +void mmInitMsgHandle(SMgmtWrapper *pWrapper); int32_t mmProcessCreateReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); int32_t mmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); int32_t mmProcessAlterReq(SMnodeMgmt *pMgmt, SNodeMsg *pMsg); diff --git a/source/dnode/mgmt/inc/qmInt.h b/source/dnode/mgmt/inc/qmInt.h index 9da956f506..02905413ab 100644 --- a/source/dnode/mgmt/inc/qmInt.h +++ b/source/dnode/mgmt/inc/qmInt.h @@ -36,8 +36,8 @@ typedef struct SQnodeMgmt { int32_t qmOpen(SMgmtWrapper *pWrapper); int32_t qmDrop(SMgmtWrapper *pWrapper); -// qmMsg.c -void qmInitMsgHandles(SMgmtWrapper *pWrapper); +// qmHandle.c +void qmInitMsgHandle(SMgmtWrapper *pWrapper); int32_t qmProcessCreateReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); int32_t qmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); diff --git a/source/dnode/mgmt/inc/smInt.h b/source/dnode/mgmt/inc/smInt.h index a179b6c44b..285ec84942 100644 --- a/source/dnode/mgmt/inc/smInt.h +++ b/source/dnode/mgmt/inc/smInt.h @@ -38,8 +38,8 @@ typedef struct SSnodeMgmt { int32_t smOpen(SMgmtWrapper *pWrapper); int32_t smDrop(SMgmtWrapper *pWrapper); -// smMsg.c -void smInitMsgHandles(SMgmtWrapper *pWrapper); +// smHandle.c +void smInitMsgHandle(SMgmtWrapper *pWrapper); int32_t smProcessCreateReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); int32_t smProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg); diff --git a/source/dnode/mgmt/inc/vmInt.h b/source/dnode/mgmt/inc/vmInt.h index 7b77f6901a..889ad7c164 100644 --- a/source/dnode/mgmt/inc/vmInt.h +++ b/source/dnode/mgmt/inc/vmInt.h @@ -84,8 +84,8 @@ void vmReleaseVnode(SVnodesMgmt *pMgmt, SVnodeObj *pVnode); int32_t vmOpenVnode(SVnodesMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl); void vmCloseVnode(SVnodesMgmt *pMgmt, SVnodeObj *pVnode); -// vmMsg.c -void vmInitMsgHandles(SMgmtWrapper *pWrapper); +// vmHandle.c +void vmInitMsgHandle(SMgmtWrapper *pWrapper); int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pReq); int32_t vmProcessAlterVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pReq); int32_t vmProcessDropVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pReq); diff --git a/source/dnode/mgmt/mm/mmHandle.c b/source/dnode/mgmt/mm/mmHandle.c index 666f9daa91..acf83d4ba8 100644 --- a/source/dnode/mgmt/mm/mmHandle.c +++ b/source/dnode/mgmt/mm/mmHandle.c @@ -73,7 +73,7 @@ int32_t mmProcessAlterReq(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) { } } -void mmInitMsgHandles(SMgmtWrapper *pWrapper) { +void mmInitMsgHandle(SMgmtWrapper *pWrapper) { // Requests handled by DNODE dndSetMsgHandle(pWrapper, TDMT_DND_CREATE_MNODE_RSP, mmProcessWriteMsg, DEFAULT_HANDLE); dndSetMsgHandle(pWrapper, TDMT_DND_ALTER_MNODE_RSP, mmProcessWriteMsg, DEFAULT_HANDLE); diff --git a/source/dnode/mgmt/mm/mmInt.c b/source/dnode/mgmt/mm/mmInt.c index 97fdafe139..cd6ea1499f 100644 --- a/source/dnode/mgmt/mm/mmInt.c +++ b/source/dnode/mgmt/mm/mmInt.c @@ -236,7 +236,7 @@ void mmSetMgmtFp(SMgmtWrapper *pWrapper) { mgmtFp.dropMsgFp = mmProcessDropReq; mgmtFp.requiredFp = mmRequire; - mmInitMsgHandles(pWrapper); + mmInitMsgHandle(pWrapper); pWrapper->name = "mnode"; pWrapper->fp = mgmtFp; } diff --git a/source/dnode/mgmt/qm/qmHandle.c b/source/dnode/mgmt/qm/qmHandle.c index 14ac08af05..77a9db1175 100644 --- a/source/dnode/mgmt/qm/qmHandle.c +++ b/source/dnode/mgmt/qm/qmHandle.c @@ -54,7 +54,7 @@ int32_t qmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { } } -void qmInitMsgHandles(SMgmtWrapper *pWrapper) { +void qmInitMsgHandle(SMgmtWrapper *pWrapper) { // Requests handled by VNODE dndSetMsgHandle(pWrapper, TDMT_VND_QUERY, qmProcessQueryMsg, QNODE_HANDLE); dndSetMsgHandle(pWrapper, TDMT_VND_QUERY_CONTINUE, qmProcessQueryMsg, QNODE_HANDLE); diff --git a/source/dnode/mgmt/qm/qmInt.c b/source/dnode/mgmt/qm/qmInt.c index 53c43bf841..585a7fb183 100644 --- a/source/dnode/mgmt/qm/qmInt.c +++ b/source/dnode/mgmt/qm/qmInt.c @@ -120,7 +120,7 @@ void qmSetMgmtFp(SMgmtWrapper *pWrapper) { mgmtFp.dropMsgFp = qmProcessDropReq; mgmtFp.requiredFp = qmRequire; - qmInitMsgHandles(pWrapper); + qmInitMsgHandle(pWrapper); pWrapper->name = "qnode"; pWrapper->fp = mgmtFp; } diff --git a/source/dnode/mgmt/sm/smHandle.c b/source/dnode/mgmt/sm/smHandle.c index dc5ee1155a..a1fa41a686 100644 --- a/source/dnode/mgmt/sm/smHandle.c +++ b/source/dnode/mgmt/sm/smHandle.c @@ -54,7 +54,7 @@ int32_t smProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) { } } -void smInitMsgHandles(SMgmtWrapper *pWrapper) { +void smInitMsgHandle(SMgmtWrapper *pWrapper) { // Requests handled by SNODE dndSetMsgHandle(pWrapper, TDMT_SND_TASK_DEPLOY, smProcessMgmtMsg, DEFAULT_HANDLE); dndSetMsgHandle(pWrapper, TDMT_SND_TASK_EXEC, smProcessExecMsg, DEFAULT_HANDLE); diff --git a/source/dnode/mgmt/sm/smInt.c b/source/dnode/mgmt/sm/smInt.c index a279655609..ef4e95d915 100644 --- a/source/dnode/mgmt/sm/smInt.c +++ b/source/dnode/mgmt/sm/smInt.c @@ -117,7 +117,7 @@ void smSetMgmtFp(SMgmtWrapper *pWrapper) { mgmtFp.dropMsgFp = smProcessDropReq; mgmtFp.requiredFp = smRequire; - smInitMsgHandles(pWrapper); + smInitMsgHandle(pWrapper); pWrapper->name = "snode"; pWrapper->fp = mgmtFp; } diff --git a/source/dnode/mgmt/vm/vmHandle.c b/source/dnode/mgmt/vm/vmHandle.c index 6a51c9a77f..89f023d430 100644 --- a/source/dnode/mgmt/vm/vmHandle.c +++ b/source/dnode/mgmt/vm/vmHandle.c @@ -233,7 +233,7 @@ int32_t vmProcessCompactVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) { return 0; } -void vmInitMsgHandles(SMgmtWrapper *pWrapper) { +void vmInitMsgHandle(SMgmtWrapper *pWrapper) { // Requests handled by VNODE dndSetMsgHandle(pWrapper, TDMT_VND_SUBMIT, (NodeMsgFp)vmProcessWriteMsg, DEFAULT_HANDLE); dndSetMsgHandle(pWrapper, TDMT_VND_QUERY, (NodeMsgFp)vmProcessQueryMsg, DEFAULT_HANDLE); diff --git a/source/dnode/mgmt/vm/vmInt.c b/source/dnode/mgmt/vm/vmInt.c index d78a567b69..b3390ba31c 100644 --- a/source/dnode/mgmt/vm/vmInt.c +++ b/source/dnode/mgmt/vm/vmInt.c @@ -339,7 +339,7 @@ void vmSetMgmtFp(SMgmtWrapper *pWrapper) { mgmtFp.closeFp = vmCleanup; mgmtFp.requiredFp = vmRequire; - vmInitMsgHandles(pWrapper); + vmInitMsgHandle(pWrapper); pWrapper->name = "vnode"; pWrapper->fp = mgmtFp; } -- GitLab