summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2021-03-13 21:53:50 +0100
committerPatrick Donnelly <pdonnell@redhat.com>2021-03-19 16:52:54 +0100
commitd0092746c7d1d234da9a9ba8fd6e3822d98897c6 (patch)
tree63b447dbfab87ef3db4ed8100abf94b0fea5bc7d
parenttest_libcephsqlite: test random inserts (diff)
downloadceph-d0092746c7d1d234da9a9ba8fd6e3822d98897c6.tar.xz
ceph-d0092746c7d1d234da9a9ba8fd6e3822d98897c6.zip
Revert "libradosstriper: add function to read into char*"
This reverts commit f7494cc1288dd4ba075975c110170e485c3e211b. This change is no longer needed. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
-rw-r--r--src/include/radosstriper/libradosstriper.hpp1
-rw-r--r--src/libradosstriper/libradosstriper.cc22
2 files changed, 0 insertions, 23 deletions
diff --git a/src/include/radosstriper/libradosstriper.hpp b/src/include/radosstriper/libradosstriper.hpp
index 064c7d2c3d8..fb790b0d7ef 100644
--- a/src/include/radosstriper/libradosstriper.hpp
+++ b/src/include/radosstriper/libradosstriper.hpp
@@ -168,7 +168,6 @@ namespace libradosstriper
* synchronously read from the striped object at the specified offset.
*/
int read(const std::string& soid, ceph::bufferlist* pbl, size_t len, uint64_t off);
- int read(const std::string& soid, char *buf, size_t len, uint64_t off);
/**
* asynchronously read from the striped object at the specified offset.
diff --git a/src/libradosstriper/libradosstriper.cc b/src/libradosstriper/libradosstriper.cc
index 7f23a380550..e98dfc17935 100644
--- a/src/libradosstriper/libradosstriper.cc
+++ b/src/libradosstriper/libradosstriper.cc
@@ -254,28 +254,6 @@ int libradosstriper::RadosStriper::read(const std::string& soid,
return rados_striper_impl->read(soid, bl, len, off);
}
-int libradosstriper::RadosStriper::read(const std::string& soid,
- char *buf,
- size_t len,
- uint64_t off)
-{
- bufferlist bl;
- bufferptr bp = buffer::create_static(len, buf);
-
- bl.push_back(bp);
-
- int ret = rados_striper_impl->read(soid, &bl, len, off);
-
- if (ret >= 0) {
- if (bl.length() > len)
- return -ERANGE;
- if (!bl.is_provided_buffer(buf))
- bl.begin().copy(bl.length(), buf);
- ret = bl.length(); // hrm :/
- }
- return ret;
-}
-
int libradosstriper::RadosStriper::aio_read(const std::string& soid,
librados::AioCompletion *c,
bufferlist* bl,