extra_params.set_mtime = set_mtime;
extra_params.owner = bucket_owner;
- RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(obj_ctx);
+ RGWRados::RGWRadosCtx *rctx = static_cast<RGWRados::RGWRadosCtx *>(obj_ctx);
bool is_olh = false;
if (head_obj.get_instance().empty()) {
}
};
-RGWObjState *RGWRadosCtx::get_state(rgw_obj& obj) {
+RGWObjState *RGWRados::RGWRadosCtx::get_state(rgw_obj& obj) {
if (!obj.get_object().empty()) {
return &objs_state[obj];
} else {
}
}
-void RGWRadosCtx::invalidate(rgw_obj& obj)
+void RGWRados::RGWRadosCtx::invalidate(rgw_obj& obj)
{
objs_state.erase(obj);
}
-void RGWRadosCtx::set_atomic(rgw_obj& obj) {
+void RGWRados::RGWRadosCtx::set_atomic(rgw_obj& obj) {
if (!obj.get_object().empty()) {
objs_state[obj].is_atomic = true;
} else {
}
}
-void RGWRadosCtx::set_prefetch_data(rgw_obj& obj) {
+void RGWRados::RGWRadosCtx::set_prefetch_data(rgw_obj& obj) {
if (!obj.get_object().empty()) {
objs_state[obj].prefetch_data = true;
} else {
}
};
-struct RGWRadosCtx {
- RGWRados *store;
- map<rgw_obj, RGWObjState> objs_state;
- int (*intent_cb)(RGWRados *store, void *user_ctx, rgw_obj& obj, RGWIntentEvent intent);
- void *user_ctx;
-
- RGWRadosCtx(RGWRados *_store) : store(_store), intent_cb(NULL), user_ctx(NULL) { }
- RGWRadosCtx(RGWRados *_store, void *_user_ctx) : store(_store), intent_cb(NULL), user_ctx(_user_ctx) { }
-
- RGWObjState *get_state(rgw_obj& obj);
- void set_atomic(rgw_obj& obj);
- void set_prefetch_data(rgw_obj& obj);
-
- void set_intent_cb(int (*cb)(RGWRados *store, void *user_ctx, rgw_obj& obj, RGWIntentEvent intent)) {
- intent_cb = cb;
- }
-
- int notify_intent(RGWRados *store, rgw_obj& obj, RGWIntentEvent intent) {
- if (intent_cb) {
- return intent_cb(store, user_ctx, obj, intent);
- }
- return 0;
- }
-
- void invalidate(rgw_obj& obj);
-};
-
struct RGWPoolIterCtx {
librados::IoCtx io_ctx;
librados::NObjectIterator iter;
friend class RGWStateLog;
friend class RGWReplicaLogger;
+public:
+ struct RGWRadosCtx {
+ RGWRados *store;
+ map<rgw_obj, RGWObjState> objs_state;
+ int (*intent_cb)(RGWRados *store, void *user_ctx, rgw_obj& obj, RGWIntentEvent intent);
+ void *user_ctx;
+
+ RGWRadosCtx(RGWRados *_store) : store(_store), intent_cb(NULL), user_ctx(NULL) { }
+ RGWRadosCtx(RGWRados *_store, void *_user_ctx) : store(_store), intent_cb(NULL), user_ctx(_user_ctx) { }
+
+ RGWObjState *get_state(rgw_obj& obj);
+ void set_atomic(rgw_obj& obj);
+ void set_prefetch_data(rgw_obj& obj);
+
+ void set_intent_cb(int (*cb)(RGWRados *store, void *user_ctx, rgw_obj& obj, RGWIntentEvent intent)) {
+ intent_cb = cb;
+ }
+
+ int notify_intent(RGWRados *store, rgw_obj& obj, RGWIntentEvent intent) {
+ if (intent_cb) {
+ return intent_cb(store, user_ctx, obj, intent);
+ }
+ return 0;
+ }
+
+ void invalidate(rgw_obj& obj);
+ };
+
+private:
/** Open the pool used as root for this gateway */
int open_root_pool_ctx();
int open_gc_pool_ctx();