]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/ImageCtx.cc
update sources to 12.2.7
[ceph.git] / ceph / src / librbd / ImageCtx.cc
index 5b277314f2a34714d3585a1d4a4204e78fb210f5..3f64a8003b05a95a489aa86f08c615a501b43cbc 100644 (file)
@@ -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) {