]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: temporarily disable putobj filters
authorCasey Bodley <cbodley@redhat.com>
Wed, 10 Oct 2018 19:54:11 +0000 (15:54 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 16 Oct 2018 15:06:14 +0000 (11:06 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_file.cc
src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rest_s3.cc

index 9a163bafbd435188e88f0333229637a8a6cbb0c2..ec20ff962ecc0729853f881c3750f186b42bd28f 100644 (file)
@@ -1324,16 +1324,18 @@ namespace rgw {
     }
 
     filter = processor;
+#if 0
     if (compression_type != "none") {
       plugin = Compressor::create(s->cct, compression_type);
-    if (! plugin) {
-      ldout(s->cct, 1) << "Cannot load plugin for rgw_compression_type "
-                       << compression_type << dendl;
-    } else {
-      compressor.emplace(s->cct, plugin, filter);
-      filter = &*compressor;
+      if (! plugin) {
+        ldout(s->cct, 1) << "Cannot load plugin for rgw_compression_type "
+                         << compression_type << dendl;
+      } else {
+        compressor.emplace(s->cct, plugin, filter);
+        filter = &*compressor;
+      }
     }
-  }
+#endif
 
   done:
     return op_ret;
@@ -1396,13 +1398,13 @@ namespace rgw {
                         << op_ret << dendl;
        goto done;
       }
-
+#if 0
       /* restore compression filter, if any */
       if (compressor) {
        compressor.emplace(s->cct, plugin, filter);
        filter = &*compressor;
       }
-
+#endif
       op_ret = put_data_and_throttle(filter, data, ofs, false);
       if (op_ret < 0) {
        goto done;
index ce754077536c4008e3133877eed137ad8a76d5fe..fc913222f22cd5bcb5b4c4b429821ed5f1a11f8b 100644 (file)
@@ -3662,7 +3662,7 @@ void RGWPutObj::execute()
   }
 
   fst = copy_source_range_fst;
-
+#if 0
   op_ret = get_encrypt_filter(&encrypt, filter);
   if (op_ret < 0) {
     return;
@@ -3682,7 +3682,7 @@ void RGWPutObj::execute()
       }
     }
   }
-
+#endif
   tracepoint(rgw_op, before_data_transfer, s->req_id.c_str());
   do {
     bufferlist data;
@@ -3751,7 +3751,7 @@ void RGWPutObj::execute()
                         << op_ret << dendl;
         return;
       }
-
+#if 0
       op_ret = get_encrypt_filter(&encrypt, filter);
       if (op_ret < 0) {
         return;
@@ -3764,6 +3764,7 @@ void RGWPutObj::execute()
           filter = &*compressor;
         }
       }
+#endif
       op_ret = put_data_and_throttle(filter, data, ofs, false);
       if (op_ret < 0) {
         return;
@@ -4011,7 +4012,7 @@ void RGWPostObj::execute()
     if (op_ret < 0) {
       return;
     }
-
+#if 0
     op_ret = get_encrypt_filter(&encrypt, filter);
     if (op_ret < 0) {
       return;
@@ -4032,7 +4033,7 @@ void RGWPostObj::execute()
         }
       }
     }
-
+#endif
     bool again;
     do {
       ceph::bufferlist data;
@@ -6779,6 +6780,7 @@ int RGWBulkUploadOp::handle_file(const boost::string_ref path,
   const auto& compression_type = store->get_zone_params().get_compression_type(
       binfo.placement_rule);
   CompressorRef plugin;
+#if 0
   if (compression_type != "none") {
     plugin = Compressor::create(s->cct, compression_type);
     if (! plugin) {
@@ -6789,7 +6791,7 @@ int RGWBulkUploadOp::handle_file(const boost::string_ref path,
       filter = &*compressor;
     }
   }
-
+#endif
   /* Upload file content. */
   ssize_t len = 0;
   size_t ofs = 0;
index dd36a180924f5fb06b91fbc5d2004bf1e33e4c11..2154b040bd88c7623d1616e9af95a1db3c99ccef 100644 (file)
@@ -7619,10 +7619,12 @@ public:
 
     if (plugin && src_attrs.find(RGW_ATTR_CRYPT_MODE) == src_attrs.end()) {
       //do not compress if object is encrypted
+#if 0
       compressor = boost::in_place(cct, plugin, filter);
       constexpr unsigned buffer_size = 512 * 1024;
       buffering = boost::in_place(&*compressor, buffer_size);
       filter = &*buffering;
+#endif
     }
     return 0;
   }
index 29dc1d1af9eaed8d5a670107fa763833a27f2643..e5fa7b09265d45ebab7568f3c27f91cfd2dec554 100644 (file)
@@ -1560,9 +1560,11 @@ int RGWPutObj_ObjStore_S3::get_encrypt_filter(
         /* We are adding to existing object.
          * We use crypto mode that configured as if we were decrypting. */
         res = rgw_s3_prepare_decrypt(s, xattrs, &block_crypt, crypt_http_responses);
+#if 0
         if (res == 0 && block_crypt != nullptr)
           *filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
               new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
+#endif
       }
     }
     /* it is ok, to not have encryption at all */
@@ -1571,10 +1573,12 @@ int RGWPutObj_ObjStore_S3::get_encrypt_filter(
   {
     std::unique_ptr<BlockCrypt> block_crypt;
     res = rgw_s3_prepare_encrypt(s, attrs, nullptr, &block_crypt, crypt_http_responses);
+#if 0
     if (res == 0 && block_crypt != nullptr) {
       *filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
           new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
     }
+#endif
   }
   return res;
 }
@@ -2085,12 +2089,14 @@ int RGWPostObj_ObjStore_S3::get_encrypt_filter(
   int res = 0;
   std::unique_ptr<BlockCrypt> block_crypt;
   res = rgw_s3_prepare_encrypt(s, attrs, &parts, &block_crypt, crypt_http_responses);
+#if 0
   if (res == 0 && block_crypt != nullptr) {
     *filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
         new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
   }
   else
     *filter = nullptr;
+#endif
   return res;
 }