From 495ea995eaf47905602515ac4e0e836a004e0a60 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 9 Nov 2021 15:10:08 +0800 Subject: [PATCH] refact --- source/dnode/vnode/impl/inc/vnodeAllocatorPool.h | 3 ++- source/dnode/vnode/impl/src/vnodeWrite.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/dnode/vnode/impl/inc/vnodeAllocatorPool.h b/source/dnode/vnode/impl/inc/vnodeAllocatorPool.h index 9fe4cbefca..f02329fa87 100644 --- a/source/dnode/vnode/impl/inc/vnodeAllocatorPool.h +++ b/source/dnode/vnode/impl/inc/vnodeAllocatorPool.h @@ -25,7 +25,8 @@ extern "C" { typedef struct { int nexta; int enda; - SMemAllocator *allocators[3]; + SMemAllocator *free[3]; + SMemAllocator *used[3]; } SVAllocatorPool; int vnodeOpenAllocatorPool(SVnode *pVnode); diff --git a/source/dnode/vnode/impl/src/vnodeWrite.c b/source/dnode/vnode/impl/src/vnodeWrite.c index 764f034810..f3204cfd37 100644 --- a/source/dnode/vnode/impl/src/vnodeWrite.c +++ b/source/dnode/vnode/impl/src/vnodeWrite.c @@ -21,9 +21,10 @@ int vnodeProcessWriteReqs(SVnode *pVnode, SReqBatch *pReqBatch) { } int vnodeApplyWriteRequest(SVnode *pVnode, const SRequest *pRequest) { - int reqType; /* TODO */ - size_t reqSize; /* TODO */ - int code = 0; + int reqType; /* TODO */ + size_t reqSize; /* TODO */ + uint64_t reqVersion = 0; /* TODO */ + int code = 0; // Copy the request to vnode buffer SRequest *pReq = mMalloc(pVnode->inuse, reqSize);