From: Shilpa Jagannath Date: Mon, 23 Mar 2026 16:46:37 +0000 (+0000) Subject: rgw: remove the now unused RGWAsyncLockSystemObj and RGWAsyncUnlockSystemObj X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f0f6b71e884e83a442bf7ac418c7025057539bbe;p=ceph.git rgw: remove the now unused RGWAsyncLockSystemObj and RGWAsyncUnlockSystemObj classes. Signed-off-by: Shilpa Jagannath --- diff --git a/src/rgw/driver/rados/rgw_cr_rados.cc b/src/rgw/driver/rados/rgw_cr_rados.cc index c1a3f1c763c8..7184d4122922 100644 --- a/src/rgw/driver/rados/rgw_cr_rados.cc +++ b/src/rgw/driver/rados/rgw_cr_rados.cc @@ -224,58 +224,6 @@ RGWOmapAppend::RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::Rad { } -int RGWAsyncLockSystemObj::_send_request(const DoutPrefixProvider *dpp) -{ - rgw_rados_ref ref; - int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref); - if (r < 0) { - ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl; - return r; - } - - rados::cls::lock::Lock l(lock_name); - utime_t duration(duration_secs, 0); - l.set_duration(duration); - l.set_cookie(cookie); - l.set_may_renew(true); - - return l.lock_exclusive(&ref.ioctx, ref.obj.oid); -} - -RGWAsyncLockSystemObj::RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, - RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, - const string& _name, const string& _cookie, uint32_t _duration_secs) : RGWAsyncRadosRequest(caller, cn), store(_store), - obj(_obj), - lock_name(_name), - cookie(_cookie), - duration_secs(_duration_secs) -{ -} - -int RGWAsyncUnlockSystemObj::_send_request(const DoutPrefixProvider *dpp) -{ - rgw_rados_ref ref; - int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref); - if (r < 0) { - ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl; - return r; - } - - rados::cls::lock::Lock l(lock_name); - - l.set_cookie(cookie); - - return l.unlock(&ref.ioctx, ref.obj.oid); -} - -RGWAsyncUnlockSystemObj::RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, - RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, - const string& _name, const string& _cookie) : RGWAsyncRadosRequest(caller, cn), store(_store), - obj(_obj), - lock_name(_name), cookie(_cookie) -{ -} - RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, map& _entries) : RGWSimpleCoroutine(_store->ctx()), diff --git a/src/rgw/driver/rados/rgw_cr_rados.h b/src/rgw/driver/rados/rgw_cr_rados.h index f49523c11645..9fd46c68adad 100644 --- a/src/rgw/driver/rados/rgw_cr_rados.h +++ b/src/rgw/driver/rados/rgw_cr_rados.h @@ -386,35 +386,6 @@ public: RGWObjVersionTracker objv_tracker; }; -class RGWAsyncLockSystemObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore* store; - rgw_raw_obj obj; - std::string lock_name; - std::string cookie; - uint32_t duration_secs; - -protected: - int _send_request(const DoutPrefixProvider *dpp) override; -public: - RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, - RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, - const std::string& _name, const std::string& _cookie, uint32_t _duration_secs); -}; - -class RGWAsyncUnlockSystemObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore* store; - rgw_raw_obj obj; - std::string lock_name; - std::string cookie; - -protected: - int _send_request(const DoutPrefixProvider *dpp) override; -public: - RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, - RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, - const std::string& _name, const std::string& _cookie); -}; - template class RGWSimpleRadosReadCR : public RGWSimpleCoroutine { const DoutPrefixProvider* dpp;