return false;
}
+
+uint64_t cls_get_osd_min_alloc_size(cls_method_context_t hctx) {
+ PrimaryLogPG::OpContext *ctx = *(PrimaryLogPG::OpContext **)hctx;
+
+ return ctx->pg->get_min_alloc_size();
+}
int set_len);
bool cls_has_chunk(cls_method_context_t hctx, std::string fp_oid);
+extern uint64_t cls_get_osd_min_alloc_size(cls_method_context_t hctx);
+
#endif
#endif
virtual bool wants_journal() = 0; //< prefers a journal
virtual bool allows_journal() = 0; //< allows a journal
+ // return store min allocation size, if applicable
+ virtual uint64_t get_min_alloc_size() const {
+ return 0;
+ }
+
/// enumerate hardware devices (by 'devname', e.g., 'sda' as in /sys/block/sda)
virtual int get_devices(std::set<std::string> *devls) {
return -EOPNOTSUPP;
bool wants_journal() override { return false; };
bool allows_journal() override { return false; };
+ uint64_t get_min_alloc_size() const override {
+ return min_alloc_size;
+ }
+
int get_devices(set<string> *ls) override;
bool is_rotational() override;
}
heartbeat_peer_lock.Unlock();
}
+
+uint64_t PG::get_min_alloc_size() const {
+ return osd->store->get_min_alloc_size();
+}
virtual void get_dynamic_perf_stats(DynamicPerfStats *stats) {
}
+ uint64_t get_min_alloc_size() const;
+
// reference counting
#ifdef PG_DEBUG_REFS
uint64_t get_with_id();
int cls_cxx_map_read_header(cls_method_handle_t, bufferlist *) {
return -ENOTSUP;
}
+
+uint64_t cls_get_osd_min_alloc_size(cls_method_context_t hctx) {
+ return 0;
+}