Skip to content

Commit

Permalink
Revert "rgw: services: sysobj: introduce omap get/set header api"
Browse files Browse the repository at this point in the history
This reverts commit efc24f8.

Signed-off-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed Jun 30, 2022
1 parent c4b1e40 commit 9fd2aa9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 69 deletions.
18 changes: 0 additions & 18 deletions src/rgw/services/svc_sys_obj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,6 @@ int RGWSI_SysObj::Obj::OmapOp::set(const DoutPrefixProvider *dpp, const map<std:
return svc->omap_set(dpp, obj, m, must_exist, y);
}

int RGWSI_SysObj::Obj::OmapOp::set_header(const DoutPrefixProvider *dpp,
const bufferlist& bl, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;

return svc->omap_set_header(dpp, obj, bl, must_exist, y);
}

int RGWSI_SysObj::Obj::OmapOp::get_header(const DoutPrefixProvider *dpp,
bufferlist* bl, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;

return svc->omap_get_header(dpp, obj, bl, y);
}

int RGWSI_SysObj::Obj::OmapOp::del(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
Expand Down
2 changes: 0 additions & 2 deletions src/rgw/services/svc_sys_obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ class RGWSI_SysObj : public RGWServiceInstance
int get_vals(const DoutPrefixProvider *dpp, const std::string& marker, uint64_t count,
std::map<std::string, bufferlist> *m,
bool *pmore, optional_yield y);
int get_header(const DoutPrefixProvider *dpp, bufferlist *bl, optional_yield y);
int set(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& bl, optional_yield y);
int set(const DoutPrefixProvider *dpp, const std::map<std::string, bufferlist>& m, optional_yield y);
int set_header(const DoutPrefixProvider *dpp, const bufferlist& bl, optional_yield y);
int del(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y);
};

Expand Down
43 changes: 0 additions & 43 deletions src/rgw/services/svc_sys_obj_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,49 +478,6 @@ int RGWSI_SysObj_Core::omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj
return r;
}

int RGWSI_SysObj_Core::omap_set_header(const DoutPrefixProvider *dpp,
const rgw_raw_obj& obj,
const bufferlist& bl,
bool must_exist, optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}

librados::ObjectWriteOperation op;
if (must_exist)
op.assert_exists();

ldpp_dout(dpp, 15) << "omap_set_header obj=" << obj << dendl;
op.omap_set_header(bl);
r = rados_obj.operate(dpp, &op, y);
return r;
}

int RGWSI_SysObj_Core::omap_get_header(const DoutPrefixProvider *dpp,
const rgw_raw_obj& obj, bufferlist* bl,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}

librados::ObjectReadOperation op;

ldpp_dout(dpp, 15) << "omap_get_header obj=" << obj << dendl;
int rv;
op.omap_get_header(bl, &rv);
r = rados_obj.operate(dpp, &op, nullptr, y);
return r;
}


int RGWSI_SysObj_Core::omap_del(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
optional_yield y)
{
Expand Down
6 changes: 0 additions & 6 deletions src/rgw/services/svc_sys_obj_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,13 @@ class RGWSI_SysObj_Core : public RGWServiceInstance
std::map<std::string, bufferlist> *m,
bool *pmore,
optional_yield y);
virtual int omap_get_header(const DoutPrefixProvider *dpp,
const rgw_raw_obj& obj,
bufferlist *bl, optional_yield y);
virtual int omap_set(const DoutPrefixProvider *dpp,
const rgw_raw_obj& obj, const std::string& key,
bufferlist& bl, bool must_exist,
optional_yield y);
virtual int omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
const std::map<std::string, bufferlist>& m, bool must_exist,
optional_yield y);
virtual int omap_set_header(const DoutPrefixProvider *dpp,
const rgw_raw_obj& obj, const bufferlist& bl,
bool must_exist, optional_yield y);
virtual int omap_del(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
optional_yield y);

Expand Down

0 comments on commit 9fd2aa9

Please sign in to comment.