if (!op.size())
return 0;
+ librados::IoCtx index_ctx;
+ BucketShard bs(this);
+ r = bs.init(bucket, obj);
+ if (r < 0) {
+ ldout(cct, 10) << "bs.init() returned r=" << r << dendl;
+ return r;
+ }
+
string tag;
if (state) {
- r = prepare_update_index(state, bucket, CLS_RGW_OP_ADD, obj, tag);
+ r = prepare_update_index(state, bs, CLS_RGW_OP_ADD, obj, tag);
if (r < 0)
return r;
}
uint64_t epoch = ref.ioctx.get_last_version();
int64_t poolid = ref.ioctx.get_id();
utime_t mtime = ceph_clock_now(cct);
- r = complete_update_index(bucket, obj.object, tag, poolid, epoch, state->size,
+ r = complete_update_index(bs, obj, tag, poolid, epoch, state->size,
mtime, etag, content_type, &acl_bl, RGW_OBJ_CATEGORY_MAIN, NULL);
} else {
- int ret = complete_update_index_cancel(bucket, obj.object, tag);
+ int ret = complete_update_index_cancel(bs, obj, tag);
if (ret < 0) {
ldout(cct, 0) << "ERROR: comlete_update_index_cancel() returned r=" << r << dendl;
}