/* XXX: For now use state->shadow_obj to store ObjectID string */
s->shadow_obj = params.op.obj.obj_id;
+ *state = &obj_state;
**state = *s;
if (follow_olh && params.op.obj.state.obj.key.instance.empty()) {
int DB::Object::Read::get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest)
{
- RGWObjState base_state;
- RGWObjState *state = &base_state;
+ RGWObjState *state;
int r = source->get_state(dpp, &state, true);
if (r < 0)
return r;
map<string, bufferlist>::iterator iter;
- RGWObjState base_state;
- RGWObjState *astate = &base_state;
+ RGWObjState *astate;
/* XXX Read obj_id too */
int r = source->get_state(dpp, &astate, true);
bufferlist read_bl;
uint64_t max_chunk_size = store->get_max_chunk_size();
- RGWObjState base_state;
- RGWObjState *astate = &base_state;
+ RGWObjState *astate;
int r = source->get_state(dpp, &astate, true);
if (r < 0)
return r;
{
DB *store = get_store();
uint64_t len;
- RGWObjState base_state;
- RGWObjState *astate = &base_state;
+ RGWObjState *astate;
int r = get_state(dpp, &astate, true);
if (r < 0) {
int DB::Object::Delete::delete_obj(const DoutPrefixProvider *dpp) {
int ret = 0;
DB *store = target->get_store();
- RGWObjState base_state;
- RGWObjState *astate = &base_state;
+ RGWObjState *astate;
int r = target->get_state(dpp, &astate, true);
if (r < 0)
RGWBucketInfo bucket_info;
rgw_obj obj;
- RGWObjState *state;
+ RGWObjState obj_state;
std::string obj_id;
bool versioning_disabled;
public:
Object(DB *_store, const RGWBucketInfo& _bucket_info, const rgw_obj& _obj) : store(_store), bucket_info(_bucket_info),
obj(_obj),
- state(NULL), versioning_disabled(false),
+ versioning_disabled(false),
bs_initialized(false) {}
Object(DB *_store, const RGWBucketInfo& _bucket_info, const rgw_obj& _obj, const std::string& _obj_id) : store(_store), bucket_info(_bucket_info), obj(_obj), obj_id(_obj_id) {}