From: Casey Bodley Date: Sun, 19 Feb 2023 15:50:03 +0000 (-0500) Subject: rgw: rgw_op.h doesn't include rgw_torrent.h X-Git-Tag: v19.0.0~1568^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8c84c67e3aad6eab818a7e343d43a927e997d63c;p=ceph.git rgw: rgw_op.h doesn't include rgw_torrent.h Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 50a42fc4c7f1..2c540dbf6767 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -52,6 +52,7 @@ #include "rgw_notify_event_type.h" #include "rgw_sal.h" #include "rgw_sal_rados.h" +#include "rgw_torrent.h" #include "rgw_lua_data_filter.h" #include "rgw_lua.h" @@ -964,7 +965,7 @@ int RGWGetObj::verify_permission(optional_yield y) if (has_s3_existing_tag || has_s3_resource_tag) rgw_iam_add_objtags(this, s, has_s3_existing_tag, has_s3_resource_tag); - if (torrent.get_flag()) { + if (get_torrent) { if (s->object->get_instance().empty()) { action = rgw::IAM::s3GetObjectTorrent; } else { @@ -2199,8 +2200,7 @@ void RGWGetObj::execute(optional_yield y) goto done_err; } /* start gettorrent */ - if (torrent.get_flag()) - { + if (get_torrent) { attr_iter = attrs.find(RGW_ATTR_CRYPT_MODE); if (attr_iter != attrs.end() && attr_iter->second.to_str() == "SSE-C-AES256") { ldpp_dout(this, 0) << "ERROR: torrents are not supported for objects " diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index 2484d7a41ad5..34306efa616a 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -47,7 +47,6 @@ #include "rgw_log.h" #include "rgw_lc.h" -#include "rgw_torrent.h" #include "rgw_tag.h" #include "rgw_object_lock.h" #include "cls/rgw/cls_rgw_client.h" @@ -60,12 +59,11 @@ #include "include/ceph_assert.h" -using ceph::crypto::SHA1; - struct req_state; class RGWOp; class RGWRados; class RGWMultiCompleteUpload; +class RGWPutObj_Torrent; namespace rgw { @@ -331,7 +329,6 @@ public: class RGWGetObj : public RGWOp { protected: - seed torrent; // get torrent const char *range_str; const char *if_mod; const char *if_unmod; @@ -349,6 +346,7 @@ protected: ceph::real_time *mod_ptr; ceph::real_time *unmod_ptr; rgw::sal::Attrs attrs; + bool get_torrent = false; bool get_data; bool partial_content; bool ignore_invalid_range; diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 88f1e7c3a6d0..d37afff526a4 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -820,9 +820,6 @@ int RGWGetObj_ObjStore::get_params(optional_yield y) get_data &= (!rgwx_stat); } - if (s->info.args.exists(GET_TORRENT)) { - return torrent.get_params(); - } return 0; } diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index ccb8a397aec2..fc729e55f05b 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -299,6 +299,8 @@ int RGWGetObj_ObjStore_S3::get_params(optional_yield y) skip_decrypt = s->info.args.exists(RGW_SYS_PARAM_PREFIX "skip-decrypt"); } + get_torrent = s->info.args.exists("torrent"); + return RGWGetObj_ObjStore::get_params(y); }