#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"
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;
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