summaryrefslogtreecommitdiffstats
path: root/src/objclass
diff options
context:
space:
mode:
authorMykola Golub <mgolub@suse.com>2019-05-31 09:13:52 +0200
committerMykola Golub <mgolub@suse.com>2019-06-23 11:06:45 +0200
commit4db6d3e0bc224ae2b9e81e071c0001965aa27a2f (patch)
treebbb3f46046e49c10c4996dc036b4b16272c5a40d /src/objclass
parentobjclass: add cls_get_min_compatible_client helper (diff)
downloadceph-4db6d3e0bc224ae2b9e81e071c0001965aa27a2f.tar.xz
ceph-4db6d3e0bc224ae2b9e81e071c0001965aa27a2f.zip
objclass: add cls_get_osd_min_alloc_size helper
Signed-off-by: Mykola Golub <mgolub@suse.com>
Diffstat (limited to 'src/objclass')
-rw-r--r--src/objclass/class_api.cc6
-rw-r--r--src/objclass/objclass.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/objclass/class_api.cc b/src/objclass/class_api.cc
index 97a192e5ed7..726193d1bfb 100644
--- a/src/objclass/class_api.cc
+++ b/src/objclass/class_api.cc
@@ -796,3 +796,9 @@ bool cls_has_chunk(cls_method_context_t hctx, string fp_oid)
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();
+}
diff --git a/src/objclass/objclass.h b/src/objclass/objclass.h
index 74ed5f7e433..7ddc6ff36fd 100644
--- a/src/objclass/objclass.h
+++ b/src/objclass/objclass.h
@@ -178,6 +178,8 @@ int cls_cxx_chunk_write_and_set(cls_method_context_t hctx, int ofs, int len,
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