From: Yehuda Sadeh Date: Wed, 3 Dec 2014 19:30:44 +0000 (-0800) Subject: rgw: decode the req_state bucket instance id if needed X-Git-Tag: v0.92~12^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=44bc63b1665c071dbbedf9b484a422ca9b7cf6b9;p=ceph.git rgw: decode the req_state bucket instance id if needed Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 124511026d7a..625f081a9a53 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -322,7 +322,14 @@ static int rgw_build_policies(RGWRados *store, struct req_state *s, bool only_bu string obj_str; RGWUserInfo bucket_owner_info; - s->bucket_instance_id = s->info.args.get(RGW_SYS_PARAM_PREFIX "bucket-instance"); + string bi = s->info.args.get(RGW_SYS_PARAM_PREFIX "bucket-instance"); + if (!bi.empty()) { + int shard_id; + ret = rgw_bucket_parse_bucket_instance(bi, &s->bucket_instance_id, &shard_id); + if (ret < 0) { + return ret; + } + } s->bucket_acl = new RGWAccessControlPolicy(s->cct);