diff --git a/curvefs/src/client/rpcclient/metacache.cpp b/curvefs/src/client/rpcclient/metacache.cpp index 5063ebe287..9c6a73c251 100644 --- a/curvefs/src/client/rpcclient/metacache.cpp +++ b/curvefs/src/client/rpcclient/metacache.cpp @@ -504,7 +504,7 @@ bool MetaCache::SelectPartition(CopysetTarget *target) { return true; } -bool MetaCache::GetCopysetIDwithInodeID(uint32_t inodeID, +bool MetaCache::GetCopysetIDwithInodeID(uint64_t inodeID, CopysetGroupID *groupID, PartitionID *partitionID, uint64_t *txId) { diff --git a/curvefs/src/client/rpcclient/metacache.h b/curvefs/src/client/rpcclient/metacache.h index 833a86f4d7..1e404d03a6 100644 --- a/curvefs/src/client/rpcclient/metacache.h +++ b/curvefs/src/client/rpcclient/metacache.h @@ -176,7 +176,7 @@ class MetaCache { bool SelectPartition(CopysetTarget *target); // get info from partitionMap or copysetMap - bool GetCopysetIDwithInodeID(uint32_t inodeID, CopysetGroupID *groupID, + bool GetCopysetIDwithInodeID(uint64_t inodeID, CopysetGroupID *groupID, PartitionID *patitionID, uint64_t *txId); bool GetCopysetInfowithCopySetID(const CopysetGroupID &groupID, diff --git a/curvefs/src/client/rpcclient/task_excutor.h b/curvefs/src/client/rpcclient/task_excutor.h index 69fca1fc85..c1137f5914 100644 --- a/curvefs/src/client/rpcclient/task_excutor.h +++ b/curvefs/src/client/rpcclient/task_excutor.h @@ -63,7 +63,7 @@ class TaskContext { TaskContext() = default; TaskContext(MetaServerOpType type, RpcFunc func, uint32_t fsid = 0, - uint32_t inodeid = 0, bool streaming = false) + uint64_t inodeid = 0, bool streaming = false) : optype(type), rpctask(func), fsID(fsid), inodeID(inodeid), streaming(streaming) {} diff --git a/curvefs/src/mds/topology/topology_manager.cpp b/curvefs/src/mds/topology/topology_manager.cpp index a9607900fd..1b6718be57 100644 --- a/curvefs/src/mds/topology/topology_manager.cpp +++ b/curvefs/src/mds/topology/topology_manager.cpp @@ -693,7 +693,8 @@ void TopologyManager::CreatePartitions(const CreatePartitionRequest *request, info->set_partitionid(partitionId); info->set_start(idStart); info->set_end(idEnd); - info->set_status(PartitionStatus::READONLY); + info->set_txid(0); + info->set_status(PartitionStatus::READWRITE); } else { // TODO(wanghai): delete partition on metaserver LOG(ERROR) << "Add partition failed after create partition."