diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp index 069e5dc58b8..314cf024589 100644 --- a/src/include/rados/librados.hpp +++ b/src/include/rados/librados.hpp @@ -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); diff --git a/src/librados/librados_cxx.cc b/src/librados/librados_cxx.cc index 4edd046831a..35d6e995974 100644 --- a/src/librados/librados_cxx.cc +++ b/src/librados/librados_cxx.cc @@ -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 &map) {