diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index a66604892da..1c0d786dbc2 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -4079,7 +4079,7 @@ void RGWPutObj::execute(optional_yield y) { torrent.init(s, store); torrent.set_create_date(mtime); - op_ret = torrent.complete(); + op_ret = torrent.complete(y); if (0 != op_ret) { ldpp_dout(this, 0) << "ERROR: torrent.handle_data() returned " << op_ret << dendl; diff --git a/src/rgw/rgw_torrent.cc b/src/rgw/rgw_torrent.cc index 22ee5b46ab6..3470471d535 100644 --- a/src/rgw/rgw_torrent.cc +++ b/src/rgw/rgw_torrent.cc @@ -102,7 +102,7 @@ void seed::update(bufferlist &bl) sha1(&h, bl, bl.length()); } -int seed::complete() +int seed::complete(optional_yield y) { uint64_t remain = info.len%info.piece_length; uint8_t remain_len = ((remain > 0)? 1 : 0); @@ -113,7 +113,7 @@ int seed::complete() do_encode(); /* save torrent data into OMAP */ - ret = save_torrent_file(); + ret = save_torrent_file(y); if (0 != ret) { ldout(s->cct, 0) << "ERROR: failed to save_torrent_file() ret= "<< ret << dendl; @@ -245,7 +245,7 @@ void seed::do_encode() dencode.bencode_end(bl); } -int seed::save_torrent_file() +int seed::save_torrent_file(optional_yield y) { int op_ret = 0; string key = RGW_OBJ_TORRENT; @@ -257,7 +257,7 @@ int seed::save_torrent_file() auto obj_ctx = store->svc()->sysobj->init_obj_ctx(); auto sysobj = obj_ctx.get_obj(raw_obj); - op_ret = sysobj.omap().set(key, bl, null_yield); + op_ret = sysobj.omap().set(key, bl, y); if (op_ret < 0) { ldout(s->cct, 0) << "ERROR: failed to omap_set() op_ret = " << op_ret << dendl; diff --git a/src/rgw/rgw_torrent.h b/src/rgw/rgw_torrent.h index 0f09d5b6d20..9959236681e 100644 --- a/src/rgw/rgw_torrent.h +++ b/src/rgw/rgw_torrent.h @@ -129,7 +129,7 @@ public: void set_create_date(ceph::real_time& value); void set_info_name(const string& value); void update(bufferlist &bl); - int complete(); + int complete(optional_yield y); private: void do_encode (); @@ -137,6 +137,6 @@ private: void set_exist(bool exist); void set_info_pieces(char *buff); void sha1(SHA1 *h, bufferlist &bl, off_t bl_len); - int save_torrent_file(); + int save_torrent_file(optional_yield y); }; #endif /* CEPH_RGW_TORRENT_H */ diff --git a/src/rgw/rgw_usage.h b/src/rgw/rgw_usage.h index 5fd3d1a8372..bab4242f04c 100644 --- a/src/rgw/rgw_usage.h +++ b/src/rgw/rgw_usage.h @@ -9,6 +9,7 @@ #include "common/Formatter.h" #include "rgw_formats.h" +#include "rgw_user.h" class RGWRados;