X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Flibrbd%2FImageCtx.cc;h=3f64a8003b05a95a489aa86f08c615a501b43cbc;hb=28e407b858acd3bddc89f68583571f771bb42e46;hp=5b277314f2a34714d3585a1d4a4204e78fb210f5;hpb=dfcb7b53b2e4fcd2a5af0240d4975adc711ab96e;p=ceph.git diff --git a/ceph/src/librbd/ImageCtx.cc b/ceph/src/librbd/ImageCtx.cc index 5b277314f..3f64a8003 100644 --- a/ceph/src/librbd/ImageCtx.cc +++ b/ceph/src/librbd/ImageCtx.cc @@ -1147,6 +1147,10 @@ struct C_InvalidateCache : public Context { journal_policy = policy; } + bool ImageCtx::is_writeback_cache_enabled() const { + return (cache && cache_max_dirty > 0); + } + void ImageCtx::get_thread_pool_instance(CephContext *cct, ThreadPool **thread_pool, ContextWQ **op_work_queue) {