mirror of
https://github.com/ceph/ceph
synced 2025-04-17 04:41:36 +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,6 +1324,7 @@ namespace rgw {
|
|||||||
}
|
}
|
||||||
|
|
||||||
filter = processor;
|
filter = processor;
|
||||||
|
#if 0
|
||||||
if (compression_type != "none") {
|
if (compression_type != "none") {
|
||||||
plugin = Compressor::create(s->cct, compression_type);
|
plugin = Compressor::create(s->cct, compression_type);
|
||||||
if (! plugin) {
|
if (! plugin) {
|
||||||
@ -1334,6 +1335,7 @@ namespace rgw {
|
|||||||
filter = &*compressor;
|
filter = &*compressor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return op_ret;
|
return op_ret;
|
||||||
@ -1396,13 +1398,13 @@ namespace rgw {
|
|||||||
<< op_ret << dendl;
|
<< op_ret << dendl;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
/* restore compression filter, if any */
|
/* restore compression filter, if any */
|
||||||
if (compressor) {
|
if (compressor) {
|
||||||
compressor.emplace(s->cct, plugin, filter);
|
compressor.emplace(s->cct, plugin, filter);
|
||||||
filter = &*compressor;
|
filter = &*compressor;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
op_ret = put_data_and_throttle(filter, data, ofs, false);
|
op_ret = put_data_and_throttle(filter, data, ofs, false);
|
||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3662,7 +3662,7 @@ void RGWPutObj::execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fst = copy_source_range_fst;
|
fst = copy_source_range_fst;
|
||||||
|
#if 0
|
||||||
op_ret = get_encrypt_filter(&encrypt, filter);
|
op_ret = get_encrypt_filter(&encrypt, filter);
|
||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
return;
|
return;
|
||||||
@ -3682,7 +3682,7 @@ void RGWPutObj::execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
tracepoint(rgw_op, before_data_transfer, s->req_id.c_str());
|
tracepoint(rgw_op, before_data_transfer, s->req_id.c_str());
|
||||||
do {
|
do {
|
||||||
bufferlist data;
|
bufferlist data;
|
||||||
@ -3751,7 +3751,7 @@ void RGWPutObj::execute()
|
|||||||
<< op_ret << dendl;
|
<< op_ret << dendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
op_ret = get_encrypt_filter(&encrypt, filter);
|
op_ret = get_encrypt_filter(&encrypt, filter);
|
||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
return;
|
return;
|
||||||
@ -3764,6 +3764,7 @@ void RGWPutObj::execute()
|
|||||||
filter = &*compressor;
|
filter = &*compressor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
op_ret = put_data_and_throttle(filter, data, ofs, false);
|
op_ret = put_data_and_throttle(filter, data, ofs, false);
|
||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
return;
|
return;
|
||||||
@ -4011,7 +4012,7 @@ void RGWPostObj::execute()
|
|||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
op_ret = get_encrypt_filter(&encrypt, filter);
|
op_ret = get_encrypt_filter(&encrypt, filter);
|
||||||
if (op_ret < 0) {
|
if (op_ret < 0) {
|
||||||
return;
|
return;
|
||||||
@ -4032,7 +4033,7 @@ void RGWPostObj::execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
bool again;
|
bool again;
|
||||||
do {
|
do {
|
||||||
ceph::bufferlist data;
|
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(
|
const auto& compression_type = store->get_zone_params().get_compression_type(
|
||||||
binfo.placement_rule);
|
binfo.placement_rule);
|
||||||
CompressorRef plugin;
|
CompressorRef plugin;
|
||||||
|
#if 0
|
||||||
if (compression_type != "none") {
|
if (compression_type != "none") {
|
||||||
plugin = Compressor::create(s->cct, compression_type);
|
plugin = Compressor::create(s->cct, compression_type);
|
||||||
if (! plugin) {
|
if (! plugin) {
|
||||||
@ -6789,7 +6791,7 @@ int RGWBulkUploadOp::handle_file(const boost::string_ref path,
|
|||||||
filter = &*compressor;
|
filter = &*compressor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* Upload file content. */
|
/* Upload file content. */
|
||||||
ssize_t len = 0;
|
ssize_t len = 0;
|
||||||
size_t ofs = 0;
|
size_t ofs = 0;
|
||||||
|
@ -7619,10 +7619,12 @@ public:
|
|||||||
|
|
||||||
if (plugin && src_attrs.find(RGW_ATTR_CRYPT_MODE) == src_attrs.end()) {
|
if (plugin && src_attrs.find(RGW_ATTR_CRYPT_MODE) == src_attrs.end()) {
|
||||||
//do not compress if object is encrypted
|
//do not compress if object is encrypted
|
||||||
|
#if 0
|
||||||
compressor = boost::in_place(cct, plugin, filter);
|
compressor = boost::in_place(cct, plugin, filter);
|
||||||
constexpr unsigned buffer_size = 512 * 1024;
|
constexpr unsigned buffer_size = 512 * 1024;
|
||||||
buffering = boost::in_place(&*compressor, buffer_size);
|
buffering = boost::in_place(&*compressor, buffer_size);
|
||||||
filter = &*buffering;
|
filter = &*buffering;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1560,9 +1560,11 @@ int RGWPutObj_ObjStore_S3::get_encrypt_filter(
|
|||||||
/* We are adding to existing object.
|
/* We are adding to existing object.
|
||||||
* We use crypto mode that configured as if we were decrypting. */
|
* We use crypto mode that configured as if we were decrypting. */
|
||||||
res = rgw_s3_prepare_decrypt(s, xattrs, &block_crypt, crypt_http_responses);
|
res = rgw_s3_prepare_decrypt(s, xattrs, &block_crypt, crypt_http_responses);
|
||||||
|
#if 0
|
||||||
if (res == 0 && block_crypt != nullptr)
|
if (res == 0 && block_crypt != nullptr)
|
||||||
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
||||||
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* it is ok, to not have encryption at all */
|
/* 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;
|
std::unique_ptr<BlockCrypt> block_crypt;
|
||||||
res = rgw_s3_prepare_encrypt(s, attrs, nullptr, &block_crypt, crypt_http_responses);
|
res = rgw_s3_prepare_encrypt(s, attrs, nullptr, &block_crypt, crypt_http_responses);
|
||||||
|
#if 0
|
||||||
if (res == 0 && block_crypt != nullptr) {
|
if (res == 0 && block_crypt != nullptr) {
|
||||||
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
||||||
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -2085,12 +2089,14 @@ int RGWPostObj_ObjStore_S3::get_encrypt_filter(
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
std::unique_ptr<BlockCrypt> block_crypt;
|
std::unique_ptr<BlockCrypt> block_crypt;
|
||||||
res = rgw_s3_prepare_encrypt(s, attrs, &parts, &block_crypt, crypt_http_responses);
|
res = rgw_s3_prepare_encrypt(s, attrs, &parts, &block_crypt, crypt_http_responses);
|
||||||
|
#if 0
|
||||||
if (res == 0 && block_crypt != nullptr) {
|
if (res == 0 && block_crypt != nullptr) {
|
||||||
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
*filter = std::unique_ptr<RGWPutObj_BlockEncrypt>(
|
||||||
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
new RGWPutObj_BlockEncrypt(s->cct, cb, std::move(block_crypt)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*filter = nullptr;
|
*filter = nullptr;
|
||||||
|
#endif
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user