]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #14601 from Jing-Scott/fix-bulkupload-multisite
authorCasey Bodley <cbodley@users.noreply.github.com>
Thu, 4 May 2017 18:01:35 +0000 (14:01 -0400)
committerGitHub <noreply@github.com>
Thu, 4 May 2017 18:01:35 +0000 (14:01 -0400)
rgw: fix forward request for bulkupload to be applied in multisite

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
1  2 
src/rgw/rgw_op.cc

index 8abea4977a70e257b1c7657c7f86fed62049e6db,8420620a0550adf89e7c927787f722045390b549..9a3930dcd4b4ad526d863c3afda423c832d659b5
@@@ -56,8 -55,35 +56,10 @@@ using ceph::crypto::MD5
  static string mp_ns = RGW_OBJ_NS_MULTIPART;
  static string shadow_ns = RGW_OBJ_NS_SHADOW;
  
- static int forward_request_to_master(struct req_state *s, obj_version *objv, RGWRados *store, bufferlist& in_data, JSONParser *jp);
+ static void forward_req_info(CephContext *cct, req_info& info, const std::string& bucket_name);
+ static int forward_request_to_master(struct req_state *s, obj_version *objv, RGWRados *store,
+                                      bufferlist& in_data, JSONParser *jp, req_info *forward_info = nullptr);
  
 -#define MULTIPART_UPLOAD_ID_PREFIX_LEGACY "2/"
 -#define MULTIPART_UPLOAD_ID_PREFIX "2~" // must contain a unique char that may not come up in gen_rand_alpha()
 -
 -class MultipartMetaFilter : public RGWAccessListFilter {
 -public:
 -  MultipartMetaFilter() {}
 -  bool filter(string& name, string& key) override {
 -    int len = name.size();
 -    if (len < 6)
 -      return false;
 -
 -    size_t pos = name.find(MP_META_SUFFIX, len - 5);
 -    if (pos == string::npos)
 -      return false;
 -
 -    pos = name.rfind('.', pos - 1);
 -    if (pos == string::npos)
 -      return false;
 -
 -    key = name.substr(0, pos);
 -
 -    return true;
 -  }
 -};
 -
  static MultipartMetaFilter mp_filter;
  
  static int parse_range(const char *range, off_t& ofs, off_t& end, bool *partial_content)