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: v9.0.0~185^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=101440a41253680770f94bc380af7072c7adaebf;p=ceph.git librbd: Remvoe unused func ImageCtx::read_from_cache. Signed-off-by: Jianpeng Ma --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index b065534b1f05..befb452ea459 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -572,21 +572,6 @@ namespace librbd { } } - 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 a35e40b54b4b..21ae7a051866 100644 --- a/src/librbd/ImageCtx.h +++ b/src/librbd/ImageCtx.h @@ -183,8 +183,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();