RGW
ceph octopus
布衣小弟
恒
展开
-
rgw daemon命令注册与处理代码流程简介
auto cct = global_init(&defaults, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, flags, "rgw_data");global_pre_init(defaults, args, module_type, code_env, flags);CephContext *cct = new CephContext(iparams.module_type, code_env, flags);构造时会完原创 2021-02-27 11:39:15 · 341 阅读 · 0 评论 -
认证函数调用过程
只是梳理了函数调用,没有详细代码注释/*s3_main_strategy_t(CephContext* const cct, ImplicitTenants& implicit_tenant_context, RGWCtl* const ctl) : s3_main_strategy_plain(cct, implicit_tenant_context, ctl), s3_main_strategy_boto2(cct, implicit_tenant_context, ctl) {原创 2020-11-15 23:38:25 · 259 阅读 · 0 评论 -
rgw v2签名生成过程
/*url=ip:portparam_vec_t params;params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "prepend-metadata", "true"));params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "stat", "true"));params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "sync-manifest", "")原创 2020-11-15 00:26:45 · 234 阅读 · 0 评论 -
01 rgw multisite 同步数据 初始化进程
run_sync_thread // 元数据同步(同步配置)meta_sync_processor_thread = new RGWMetaSyncProcessorThread(this->store, async_processor);ret = meta_sync_processor_thread->init();meta_sync_processor_thread->start();// trim logrgw::BucketTrimConfig config;原创 2020-09-18 15:57:41 · 433 阅读 · 0 评论 -
rgw multisite 协程源码分析
rgw multisite 协程通过RGWCoroutinesManager::run启动,然后通过call或者spawn来添加新的op到调度队列。call的作用通过call来执行的op,会将该op加入到stack的顶部,然后该op得到调用,只有最顶部的op执行完成,该op会被出栈,然后接着执行最顶部的opspawn的作用通过spawn来执行的op,会生成一个新的stack,并添加到当前的env->scheduled_stacks中,然后这些stack会被顺序调度。由于stack中的op可以原创 2020-09-15 19:35:20 · 826 阅读 · 0 评论 -
AtomicObjectProcessor 10M对象的处理过程
第一次写[0,4M],将4M数据保存到first_chunk中后即可返回,不涉及manifest等处理也不涉及写radosHeadObjectProcessor::process(bufferlist&& data, uint64_t logical_offset) // data.length()=4M,logical_offset=0 flush = false,data_offset = 0, head_chunk_size = 4M, remaining = count =原创 2020-09-10 00:50:04 · 228 阅读 · 0 评论 -
AtomicObjectProcessor 写对象
以4M作为一次写rados的上限 写10M数据// 假设写10M数据,顺序如下:[0,4M]保存到first_chunk中,[4M,8M]写入rados,[8M,10M]小于4M通过chunk写入rados// 第一次写 4M, logical_offset = 0int HeadObjectProcessor::process(bufferlist&& data, uint64_t logical_offset){ // 第一次:data.length = 4M const原创 2020-09-09 17:36:47 · 255 阅读 · 0 评论 -
AtomicObjectProcessor prepare&写整体流程
为了便于说明,以代码默认的4M为例prepare// prepare主要完成对manifest的初始化处理。AtomicObjectProcessor::prepare// 获取数据池的名称:head_pool// alignment : rados对齐方式, 假设64K对齐。max_head_chunk_size : head的最大长度,假设为4M// 假设 head_max_size = chunk_size = max_head_chunk_size = 4M// stripe_si原创 2020-09-09 17:22:29 · 396 阅读 · 0 评论 -
AtomicObjectProcessor 执行入口
List item类继承关系class RGWPutObj : public RGWOpclass RGWPutObj_ObjStore : public RGWPutObjclass RGWPutObj_ObjStore_S3 : public RGWPutObj_ObjStoreList item参数解析// RGWHandler_REST_S3::init ---> copy_source 赋值操作等RGWPutObj::verify_permission --->.原创 2020-09-09 16:48:43 · 200 阅读 · 0 评论 -
process_request O版本rgw处理请求入口
1:基于S3协议的put操作说明2:rgw处理client的请求的入口3:下次分析put obj 的execute流程int process_request(rgw::sal::RGWRadosStore* const store, RGWREST* const rest, RGWRequest* const req, const std::string& frontend_prefix, const rgw_auth_registry_t& auth_registry,原创 2020-09-09 16:05:21 · 415 阅读 · 0 评论