]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_op.h doesn't include rgw_torrent.h
authorCasey Bodley <cbodley@redhat.com>
Sun, 19 Feb 2023 15:50:03 +0000 (10:50 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 2 Mar 2023 13:56:21 +0000 (08:56 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest_s3.cc

index 50a42fc4c7f1df0b45adbc703449b531f022b35d..2c540dbf6767f4dd186d990af7a037982e97a9a9 100644 (file)
@@ -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 "
index 2484d7a41ad5e31f20c7da466fa4da693a947925..34306efa616ab7d010343ac5798297a003d7ea9b 100644 (file)
@@ -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"
 
 #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;
index 88f1e7c3a6d0fd05cff6a6f107ddb56a6d3375fa..d37afff526a4b30b0ad5f7a35a46e6b5a26df929 100644 (file)
@@ -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;
 }
 
index ccb8a397aec258ca2f87b4e1389de659a3b26fd6..fc729e55f05b6d6baf5df11de76a28f06ab75e68 100644 (file)
@@ -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);
 }