diff options
author | Sage Weil <sage@inktank.com> | 2013-09-04 16:39:34 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-04 16:39:34 -0700 |
commit | 16b24f10a022a1aabdecf0af1bd428b23aa83229 (patch) | |
tree | f8442f85b2d21507829af90f7df42eaa388c0b46 | |
parent | 3e90c2abc9dfa60d44c1b57fa315625dbf960c60 (diff) | |
download | ceph-16b24f10a022a1aabdecf0af1bd428b23aa83229.tar.gz |
librados: make note of which calls steal the bufferlist contents
This is an unfortunate feature of the API, but it can't be changed without
potentially breaking users.
Fixes: #5989
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/include/rados/librados.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp index 5a750cbc0d1..94d3d23a824 100644 --- a/src/include/rados/librados.hpp +++ b/src/include/rados/librados.hpp @@ -439,8 +439,23 @@ namespace librados int create(const std::string& oid, bool exclusive); int create(const std::string& oid, bool exclusive, const std::string& category); + /** + * write bytes to an object at a specified offset + * + * NOTE: this call steals the contents of @param bl. + */ int write(const std::string& oid, bufferlist& bl, size_t len, uint64_t off); + /** + * append bytes to an object + * + * NOTE: this call steals the contents of @param bl. + */ int append(const std::string& oid, bufferlist& bl, size_t len); + /** + * replace object contents with provided data + * + * NOTE: this call steals the contents of @param bl. + */ int write_full(const std::string& oid, bufferlist& bl); int clone_range(const std::string& dst_oid, uint64_t dst_off, const std::string& src_oid, uint64_t src_off, @@ -457,7 +472,17 @@ namespace librados int stat(const std::string& oid, uint64_t *psize, time_t *pmtime); int exec(const std::string& oid, const char *cls, const char *method, bufferlist& inbl, bufferlist& outbl); + /** + * modify object tmap based on encoded update sequence + * + * NOTE: this call steals the contents of @param bl + */ int tmap_update(const std::string& oid, bufferlist& cmdbl); + /** + * replace object contents with provided encoded tmap data + * + * NOTE: this call steals the contents of @param bl + */ int tmap_put(const std::string& oid, bufferlist& bl); int tmap_get(const std::string& oid, bufferlist& bl); |