Curve文件系统空间分配方案
0; }; using Extents = std::vector; class Allocator { public: Allocator(...) {} virtual ~Allocator() = default;© XXX Page 10 of 11 /** * @brief * * @param size uint64_t */ virtual uint64_t Allocate(uint32_t size, const AllocateHint& allocateHint, Extents* extents) = 0; /** * @brief */ virtual void Deallocate(const Extents& extents) = 0; /** * @brief */ virtual bool MarkUsed(const Extents& extents) = 0; /** * @brief */ virtual bool MarkUsable(const Extents& extents) = 0; /** 0 码力 | 11 页 | 159.17 KB | 5 月前3CurveBS IO Processing Flow
topology structure of CURVE. CurveBS uses the central node Metadata Server (MDS) to manage virtual disk mapping and data replicas distribution. Decentralization currently leads to excessive complexity rollback from snapshot CurveBS data organization Data organization of virtual block device in CurveBS1. CurveBS maps the virtual block device to a file. For example, block device /dev/sda corresponds support 4KB aligned read/write on block devices.CurveBS file structure of virtual block device As mentioned above, CurveBS maps virtual block devices to files. Let's look at the metadata for a file in CurveBS0 码力 | 13 页 | 2.03 MB | 5 月前3CurveFS对接S3方案设计
S3Client() {} virtual ~S3Client() {} virtual void Init(curve::common::S3AdapterOption option) = 0; virtual int Upload(std::string name, const char* buf, uint64_t length) = 0; virtual int Append(std::string Append(std::string name, const char* buf, uint64_t length) = 0; virtual int Download(std::string name, char* buf, uint64_t offset, uint64_t length) = 0; }; metaserver.proto enum FileType { TYPE_DIRECTORY0 码力 | 11 页 | 145.77 KB | 5 月前3CurveFS S3本地缓存盘方案
class DiskCacheManagerImpl : public DiskCacheManager{ public: DiskCacheManagerImpl(); virtual ~DiskCacheManagerImpl() { TrimStop(); } int Init(const std::string cacheDir); maxCachedObj; // ? bthread::Mutex mtx_; }; class DiskCacheWrite { public: DiskCacheWrite() {} virtual ~DiskCacheWrite() { AsyncUploadStop(); } int WriteDiskFile(std::string fullWriteDir std::string CacheDir_; }; class DiskCacheRead { public:© XXX Page 7 of 9 DiskCacheRead() {} virtual ~DiskCacheRead() {} int ReadDiskFile(std::string name, char* buf, uint64_t offset, uint64_t0 码力 | 9 页 | 150.46 KB | 5 月前3OID CND Asia Slide: CurveFS
Chunkserver is a service instance on a physical serverCurve metadata organization Curve maps virtual block devices to files Each file contains chunks scattered across storage nodes in the cluster0 码力 | 24 页 | 3.47 MB | 5 月前3Curve支持S3 数据缓存方案
chunkPos_(chunkPos), len_(len) { data_ = new char[len]; memcpy(data_, data, len); } virtual ~DataCache() { delete data_; data_ = NULL; } void Write(uint32_t cachePos0 码力 | 9 页 | 179.72 KB | 5 月前3Curve文件系统元数据Proto(接口定义)
specific language governing permissions and * limitations under the License. */ syntax="proto2"; package curvefs.mds; option cc_generic_services = true; enum FSStatusCode { OK = 0; // specific language governing permissions and * limitations under the License. */ syntax="proto2"; package curvefs.metaserver; option cc_generic_services = true; enum MetaStatusCode { OK = 0; specific language governing permissions and * limitations under the License. */ syntax="proto2"; package curvefs.space; option cc_generic_services = true; enum SpaceStatusCode { OK = 0;0 码力 | 15 页 | 80.33 KB | 5 月前3
共 7 条
- 1