Category: Uncategorized

Notes on RGW Sytem Object State

RGW raw object store has following structure: // rgw/rgw_rados.h struct RGWRawObjState { rgw_raw_obj obj; bool has_attrs{false}; bool exists{false}; uint64_t size{0}; ceph::real_time mtime; uint64_t epoch; bufferlist obj_tag; bool has_data{false}; bufferlist data; bool prefetch_data{false}; uint64_t pg_ver{0}; /* important! don’t forget to update copy constructor */ RGWObjVersionTracker objv_tracker; map<string, bufferlist> attrset; […]

Notes on RGW Request Path

The principle class is RGWOp. It defines request state, RGWRados store pointer. A RGW request struct req_state has Ceph contect op type info account, bucket info zonegroup name RGWBucketInfo bucket_info RGWUserInfo *user Op Execution RGWGetObj::execute() is the primary execution context under the class RGWGetObj. It uses interfaces of […]

Notes on RGW Manifest

RGW maintains a manifest of each object. The class RGWObjManifest implements the details with object head, tail placement. Manifest is written as XATTRs along with RGWRados::Object::Write::_do_write_meta( ). /** * Write/overwrite an object to the bucket storage. * bucket: the bucket to store the object in * obj: the […]

Notes on Ceph librados Client

Cluster Connection A client is an application that uses librados to connect to a Ceph cluster. It needs a cluster object populatd with cluster info (cluster name, info from ceph.conf) Then the client do a rados_connect and cluster handle is populated. A cluster handle can bind with different […]

Ceph Luminous build

struct RGWObjectCtx { RGWRados *store; void *user_ctx; RGWObjectCtxImpl<rgw_obj, RGWObjState> obj; RGWObjectCtxImpl<rgw_raw_obj, RGWRawObjState> raw; explicit RGWObjectCtx(RGWRados *_store) : store(_store), user_ctx(NULL), obj(store), raw(store) { } RGWObjectCtx(RGWRados *_store, void *_user_ctx) : store(_store), user_ctx(_user_ctx), obj(store), raw(store) { } }; Written with StackEdit.