Curve文件系统元数据Proto(接口定义)curve文件系统元数据proto(代码接口定义,已实现)© XXX Page 2 of 15 1、代码结构和代码目录 curve文件系统是相对于curve块设备比较独立的一块,在当前curve项目的目录下,增加一个一级目录curvefs,curvefs下有自己独立的proto\src\test。 2、文件系统proto定义 2.1 mds.proto mds.proto /* * Copyright for the specific language governing permissions and * limitations under the License. */ syntax="proto2"; package curvefs.mds; option cc_generic_services = true; enum FSStatusCode { OK = 0; rpc DeleteFsInfo(DeleteFsInfoRequest) returns (DeleteFsInfoResponse); } 2.2 metaserver.proto metaserver.proto /* * Copyright (c) 2020 NetEase Inc. * * Licensed under the Apache License, Version0 码力 | 15 页 | 80.33 KB | 6 月前3
CurveFs 用户权限系统调研file access to the filesystem owner, so that all users (including root) can access the files. allow_root This option is similar to allow_other but file access is limited Major version of the protocol (read-only) */ unsigned proto_major; /** * Minor version of the protocol (read-only) */ unsigned proto_minor; /** * Maximum size of the write buffer */ unsigned effective rights -E, --no-effective print no effective rights -s, --skip-base skip files that only have the base entries -R, --recursive recurse into subdirectories -L, --logical0 码力 | 33 页 | 732.13 KB | 6 月前3
CurveFS对接S3方案设计2021-05-20 胡遥 初稿 2021-07-20 胡遥 细化write和read流程 整体架构 整体思路 接口和关键数据结构 mds.proto client端数据结构 metaserver.proto space相关数据结构和proto 关键流程 init流程 write流程 read流程 整体架构 S3ClientAdaptor模块:负责将文件数据进行chunk,以及bl 行++,比如覆盖写了0~4M,则数据会写到chunkid_0_1的对象,则元数据包含了2个S3Chunkinfo{2,0,0,8M}和{2,1,0,4M}。 接口和关键数据结构 common.proto enum FSType { TYPE_VOLUME = 1; TYPE_S3 = 2; } message S3Info { required string ak = uint64 blockSize = 5; required uint64 chunkSize = 6; } mds.proto© XXX Page 4 of 11 import "curvefs/proto/common.proto"; message CreateFsRequest { required string fsName = 1; required0 码力 | 11 页 | 145.77 KB | 6 月前3
CurveFS ChunkID持久化chunkid全局递增。 实现 proto/space.proto 中的 message AllocateS3ChunkRequest、message AllocateS3ChunkResponse 复制到 proto/mds.proto; 修改 AllocateS3ChunkResponse 的状态码的类型为 FSStatusCode; proto/space.proto/service SpaceAllocService中的 SpaceAllocService中的 rpc AllocateS3Chunk 复制到 proto/space.proto/service/MdsService中; curvefs/src/mds/mds_services.h MdsServiceImp类中增加 AllocateS3Chunk 实现; curvefs/src/mds/mds_services.h MdsServiceImp类中增加 ChunkIDGenerator0 码力 | 3 页 | 79.38 KB | 6 月前3
CurveFS Copyset与FS对应关系specifiedZone ) (hosts chooseTargetMetaHosts string uint64 string int bool string [] , peers []proto.Peer, err ) string error metanode是否能够创建copyset,由这个函数判断。有这些判断条件: 1、metaNode的存活状态 2、metaNode的内存使用情况 下一个版本,再实现的多对一的场景。 接口设计:https://github.com/opencurve/curve/pull/495 增加copyset.proto 增加heartbeat.proto 增加topology.proto 8、inode和dentry的内存估算 类型 byte sizeof(dentry) 56 dentry的name字段,按照最大估算 256 sizeof(inode)0 码力 | 19 页 | 383.29 KB | 6 月前3
Curve文件系统元数据管理4、curve文件系统的元数据内存组织 curve文件系统元数据主要有3个类型,inode, dentry, 。 extent 4.1 inode定义: inode定义见:curve文件系统元数据proto(代码接口定义,已实现)© XXX Page 5 of 24 typedef uint64_t InodeId; enum FileType { TYPE_DIRECTORY = 0, Inode ::curve::common::RWLock lock_; };© XXX Page 6 of 24 4.2 dentry的定义: dentry定义见:curve文件系统元数据proto(代码接口定义,已实现) typedef uint64_t InodeId; class Dentry{ uint64_t fsId; InodeId parentId; InodeId // user© XXX Page 22 of 24 std::string user; // passworduserroot std::string password; }; // proto enum FSErrorNum { FS_OK = 0, // TODO FS_UNKNOWN = 1000, }; // S3super block class VolumeFs {0 码力 | 24 页 | 204.67 KB | 6 月前3
Curve文件系统元数据持久化方案设计protobuf 直接序列化 顺序编码: 利用 protobuf(SerializeToString)进行序列化© XXX Page 6 of 12 // curvefs/proto/metaserver.proto message DentryKey { // required uint32 fsId = 1; required uint64 parentInodeId0 码力 | 12 页 | 384.47 KB | 6 月前3
Curve核心组件之mds – 网易数帆100 zonenum: 3 scatterwidth: 0NAMESERVER NameServer管理namespace元数据信息,包括(更具体的信息可以查看curve/proto/nameserver2.proto): • FileInfo: 文件的信息。 • PageFileSegment: segment是给文件分配空间的最小单位 。 • PageFileChunkInfo: chunk是数据分片的最小单元。0 码力 | 23 页 | 1.74 MB | 6 月前3
Curve文件系统空间分配方案/response定义如下。与 里的定义基本一致。 CurveFS Client 概要设计(已实现)#%E6%8E%A5%E5%8F%A3%E9%9C%80%E6%B1%82 syntax="proto2"; option cc_generic_services = true; enum StatusCode { UNKNOWN_ERROR = 0; // OK = 1;0 码力 | 11 页 | 159.17 KB | 6 月前3
BRPC与UCX集成指南●多协议支持 –baidu_std,http,grpc… ●protobuf3 BRPC简介 ●Client/Server架构 ●使用Protobuf定义协议文件 –例如: echo.proto:4 BRPC简介 client server EchoRequest EchoResponse5 BRPC简介 ●Channel类 –代表一个连接,Client通过Channel发0 码力 | 66 页 | 16.29 MB | 6 月前3
共 14 条
- 1
- 2













