Curve文件系统元数据管理
{ public: void Insert(const Inode &inode); bool Get(const InodeKey &key, Inode *inode); void Delete(const InodeKey &key); void Update(const Inode &inode); int Count(); private: // Inodefsid &key, Dentry *dentry); bool List(const DentryParentKey &key, std::list); void Delete(const DentryKey &key); void Update(const Dentry &dentry); DentryKey GetKey(InodeId parentId mount(std::string mountPoint); // int32_t umount(std::string mountPoint); // mountNum0 int32_t Delete(); uint64_t GetUsedSize(); private: // idmkfs uint64_t id; // uint32_t mountNum; // inode© 0 码力 | 24 页 | 204.67 KB | 5 月前3CurveBS IO Processing Flow
Provides read and write data interfaces for upper-layer applications l Interacts with MDS to add, delete, modify, and query metadata l Interacts with the chunkServer to read and write data 4. Snapshotcloneserver Machine corresponds to the chunk in the CurveBS, and it applies the operations on the chunk (write, delete, snapshot) to the corresponding chunk.Client 1. CurveBS client provides services by libCurve0 码力 | 13 页 | 2.03 MB | 5 月前3Curve文件系统元数据持久化方案设计
std::string& key, const std::string& value); int Get(const std::string& key, std::string* value); int Delete(const std::string& key); int Save(); // int Load(); // public: // on_apply rehash 执行期间的哈希表操作: 因为在进行渐进式 rehash 的过程中, 字典会同时使用 ht[0] 和 ht[1] 两个哈希表, 所以在渐进式 rehash 进行期间, 字典的删除 (delete)、查找(find)、更新(update) 等操作会在两个哈希表上进行: 比如说,要在字典里面查找一个键的话,程序会先在 ht[0] 里面进行查找,如果没找到的话,就会继续到 ht[1] 里面进行查找,诸如此类0 码力 | 12 页 | 384.47 KB | 5 月前3Curve支持S3 数据缓存方案
data_ = new char[len]; memcpy(data_, data, len); } virtual ~DataCache() { delete data_; data_ = NULL; } void Write(uint32_t cachePos, uint32_t len, const char* questVer中request采用异步 5.等待所有的request返回,更新读缓存,获取返回数据填充readBuf。 ReleaseCache流程 1.由于删除采用异步的方式,所以对于delete操作仅仅需要释放client的cache缓存。这里同时要保证的一点是:上层确保该文件没有被打开,才能调用该接口,因此不用考虑cache被删除的同时又有人来增加或修 改 2.根据inodeId找到对应FileCacheManager0 码力 | 9 页 | 179.72 KB | 5 月前3curvefs client删除文件和目录功能设计
这种情况下,就会存在nlink未被减1的情况,当所有硬链接都被删除后,就会出现孤儿inode。 moosefs由于只有一个mds节点看,所以不存在这个问题。 chubaofs的解决方案是: 在Delete_ll(api.go) 函数中,在delete dentry后有一段注释如下: // dentry is deleted successfully but inode is not, still returns success0 码力 | 15 页 | 325.42 KB | 5 月前3Curve核心组件之Client - 网易数帆
com/opencurve/curve-csi CLIENT上层应用CLIENT虚拟块设备CLIENT主要功能 提供接口 数据面:AioWrite/AioRead、Write/Read 控制面:Create/Delete、Open/Close、Rename等 IO处理:转换、拆分、合并 元数据获取及缓存 逻辑chunk与物理chunk映射关系 物理chunk所属的复制组(copyset)0 码力 | 27 页 | 1.57 MB | 5 月前3CurveFS对接S3方案设计
std::atomicchunkId_;© XXX Page 10 of 11 }; 关键流程 关键流程包括S3ClientAdaptor的init,write,read,delete和后台元数据整理以及数据回收流程 init流程 1.将conf中blockSize,chunkSize,metaServer和allocateServer ip保存在S3ClientAdaptor中 0 码力 | 11 页 | 145.77 KB | 5 月前3Curve元数据节点高可用
代码流程说明如下:© XXX Page 8 of 30© XXX Page 9 of 30© XXX Page 10 of 30 etcd中的revision是全局的,只要有key-value的修改(put, delete txn),revision都会增加。举例说明:© XXX Page 11 of 30 $ ETCDCTL_API=3 ./bin/etcdctl put foo bar $ ETCDCTL_API=30 码力 | 30 页 | 2.42 MB | 5 月前3Open Flags 调研
take_async_err() { int e = async_err; async_err = 0; return e; } Fh() = delete; Fh(InodeRef in, int flags, int cmode, uint64_t gen, const UserPerm &perms); ~Fh();© XXX Page0 码力 | 23 页 | 524.47 KB | 5 月前3
共 9 条
- 1