]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "libradosstriper: add function to read into char*"
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 13 Mar 2021 20:53:50 +0000 (12:53 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 19 Mar 2021 15:52:54 +0000 (08:52 -0700)
This reverts commit f7494cc1288dd4ba075975c110170e485c3e211b.

This change is no longer needed.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/include/radosstriper/libradosstriper.hpp
src/libradosstriper/libradosstriper.cc

index 064c7d2c3d84a4b8d254c42bf8df7dc593377d37..fb790b0d7ef15343041af9d9175c30e8f9a6ac3a 100644 (file)
@@ -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.
index 7f23a380550e789a8bc291c8a82c2f1a90819fc9..e98dfc17935aea28bac3263a00a4a97774cce02e 100644 (file)
@@ -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,