]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/blk/BlockDevice.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / blk / BlockDevice.h
index 67b4b330b6c45fd970e36f6a85f60e304db47d85..440faf3d4b4c0c5602ab5d45aa39a9984e216684 100644 (file)
@@ -29,6 +29,7 @@
 #include "acconfig.h"
 #include "common/ceph_mutex.h"
 #include "include/common_fwd.h"
+#include "extblkdev/ExtBlkDevInterface.h"
 
 #if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)
 #include "aio/aio.h"
@@ -237,8 +238,8 @@ public:
   uint64_t get_optimal_io_size() const { return optimal_io_size; }
 
   /// hook to provide utilization of thinly-provisioned device
-  virtual bool get_thin_utilization(uint64_t *total, uint64_t *avail) const {
-    return false;
+  virtual int get_ebd_state(ExtBlkDevState &state) const {
+    return -ENOENT;
   }
 
   virtual int collect_metadata(const std::string& prefix, std::map<std::string,std::string> *pm) const = 0;
@@ -286,8 +287,7 @@ public:
     bool buffered,
     int write_hint = WRITE_LIFE_NOT_SET) = 0;
   virtual int flush() = 0;
-  virtual int discard(uint64_t offset, uint64_t len) { return 0; }
-  virtual int queue_discard(interval_set<uint64_t> &to_release) { return -1; }
+  virtual bool try_discard(interval_set<uint64_t> &to_release, bool async=true) { return false; }
   virtual void discard_drain() { return; }
 
   // for managing buffered readers/writers