return true;
}
+ /**
+ * is_journal_rotational
+ *
+ * Check whether journal is backed by a rotational (HDD) or non-rotational
+ * (SSD) device.
+ *
+ *
+ * @return true for HDD, false for SSD
+ */
+ virtual bool is_journal_rotational() {
+ return true;
+ }
+
+ virtual string get_default_device_class() {
+ return is_rotational() ? "hdd" : "ssd";
+ }
+
virtual bool can_sort_nibblewise() {
return false; // assume a backend cannot, unless it says otherwise
}
uint64_t offset,
size_t len,
bufferlist& bl,
- uint32_t op_flags = 0,
- bool allow_eio = false) = 0;
+ uint32_t op_flags = 0) = 0;
virtual int read(
CollectionHandle &c,
const ghobject_t& oid,
uint64_t offset,
size_t len,
bufferlist& bl,
- uint32_t op_flags = 0,
- bool allow_eio = false) {
- return read(c->get_cid(), oid, offset, len, bl, op_flags, allow_eio);
+ uint32_t op_flags = 0) {
+ return read(c->get_cid(), oid, offset, len, bl, op_flags);
}
/**
// DEBUG
virtual void inject_data_error(const ghobject_t &oid) {}
virtual void inject_mdata_error(const ghobject_t &oid) {}
+
+ virtual void compact() {}
};
WRITE_CLASS_ENCODER(ObjectStore::Transaction)
WRITE_CLASS_ENCODER(ObjectStore::Transaction::TransactionData)