mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
rgw: temporarily disable putobj filters
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
6907e85d9d
commit
d0c9798eb5
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user