From: Jianpeng Ma Date: Thu, 5 Feb 2015 03:28:50 +0000 (+0800) Subject: librbd: Remvoe unused func ImageCtx::read_from_cache. X-Git-Tag: v0.94.4~25^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05734916ab119c6d3879c2ce2bc9f9581907861a;p=ceph.git librbd: Remvoe unused func ImageCtx::read_from_cache. Signed-off-by: Jianpeng Ma (cherry picked from commit 101440a41253680770f94bc380af7072c7adaebf) --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index 8f3c8fbd89a6f..ebdd184616bdb 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -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(); diff --git a/src/librbd/ImageCtx.h b/src/librbd/ImageCtx.h index f9a88784e18f9..1022474e8a5b7 100644 --- a/src/librbd/ImageCtx.h +++ b/src/librbd/ImageCtx.h @@ -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();