]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: Remvoe unused func ImageCtx::read_from_cache.
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 5 Feb 2015 03:28:50 +0000 (11:28 +0800)
committerLoic Dachary <ldachary@redhat.com>
Sun, 6 Sep 2015 12:07:55 +0000 (14:07 +0200)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 101440a41253680770f94bc380af7072c7adaebf)

src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h

index 8f3c8fbd89a6ff9eaf8926b2d04f2cafa9e5366f..ebdd184616bdbe6a519f00053df47dc70fdb1dbe 100644 (file)
@@ -636,21 +636,6 @@ public:
     }
   }
 
-  int ImageCtx::read_from_cache(object_t o, uint64_t object_no, bufferlist *bl,
-                               size_t len, uint64_t off) {
-    int r;
-    Mutex mylock("librbd::ImageCtx::read_from_cache");
-    Cond cond;
-    bool done;
-    Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &r);
-    aio_read_from_cache(o, object_no, bl, len, off, onfinish, 0);
-    mylock.Lock();
-    while (!done)
-      cond.Wait(mylock);
-    mylock.Unlock();
-    return r;
-  }
-
   void ImageCtx::user_flushed() {
     if (object_cacher && cct->_conf->rbd_cache_writethrough_until_flush) {
       md_lock.get_read();
index f9a88784e18f9757d249867b96639d2fd68eca2d..1022474e8a5b7a689154e345f1d0aaa3ff93cd73 100644 (file)
@@ -191,8 +191,6 @@ namespace librbd {
                             int fadvise_flags);
     void write_to_cache(object_t o, const bufferlist& bl, size_t len,
                        uint64_t off, Context *onfinish, int fadvise_flags);
-    int read_from_cache(object_t o, uint64_t object_no, bufferlist *bl,
-                       size_t len, uint64_t off);
     void user_flushed();
     void flush_cache_aio(Context *onfinish);
     int flush_cache();