librados: add new setxattr overload back

this change reverts b8ff781ddc

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2018-11-02 21:44:18 +08:00
parent 28f18c4e31
commit 0a03a4e5c1
2 changed files with 8 additions and 0 deletions

View File

@ -380,6 +380,7 @@ namespace librados
void zero(uint64_t off, uint64_t len);
void rmxattr(const char *name);
void setxattr(const char *name, const bufferlist& bl);
void setxattr(const char *name, const bufferlist&& bl);
void tmap_update(const bufferlist& cmdbl);
void tmap_put(const bufferlist& bl);
void selfmanaged_snap_rollback(uint64_t snapid);

View File

@ -498,6 +498,13 @@ void librados::ObjectWriteOperation::setxattr(const char *name, const bufferlist
o->setxattr(name, v);
}
void librados::ObjectWriteOperation::setxattr(const char *name,
const buffer::list&& v)
{
::ObjectOperation *o = &impl->o;
o->setxattr(name, std::move(v));
}
void librados::ObjectWriteOperation::omap_set(
const map<string, bufferlist> &map)
{