diff options
author | Mykola Golub <mgolub@suse.com> | 2019-05-31 09:12:10 +0200 |
---|---|---|
committer | Mykola Golub <mgolub@suse.com> | 2019-06-23 11:06:45 +0200 |
commit | 870cefb32cdbd5a1298c16de09c34a0ecc1b3b8d (patch) | |
tree | 6aed14f54fd5c939ee9ddd334285f125ed85d964 | |
parent | objclass: add cls_cxx_truncate method (diff) | |
download | ceph-870cefb32cdbd5a1298c16de09c34a0ecc1b3b8d.tar.xz ceph-870cefb32cdbd5a1298c16de09c34a0ecc1b3b8d.zip |
objclass: add cls_get_min_compatible_client helper
Signed-off-by: Mykola Golub <mgolub@suse.com>
-rw-r--r-- | src/objclass/class_api.cc | 6 | ||||
-rw-r--r-- | src/objclass/objclass.h | 1 | ||||
-rw-r--r-- | src/test/librados_test_stub/LibradosTestStub.cc | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/objclass/class_api.cc b/src/objclass/class_api.cc index 1f278091337..97a192e5ed7 100644 --- a/src/objclass/class_api.cc +++ b/src/objclass/class_api.cc @@ -708,6 +708,12 @@ ceph_release_t cls_get_required_osd_release(cls_method_context_t hctx) return ctx->pg->get_osdmap()->require_osd_release; } +ceph_release_t cls_get_min_compatible_client(cls_method_context_t hctx) +{ + PrimaryLogPG::OpContext *ctx = *(PrimaryLogPG::OpContext **)hctx; + return ctx->pg->get_osdmap()->get_require_min_compat_client(); +} + void cls_cxx_subop_version(cls_method_context_t hctx, string *s) { if (!s) diff --git a/src/objclass/objclass.h b/src/objclass/objclass.h index 2cc0cd22ef1..74ed5f7e433 100644 --- a/src/objclass/objclass.h +++ b/src/objclass/objclass.h @@ -160,6 +160,7 @@ extern int cls_current_subop_num(cls_method_context_t hctx); extern uint64_t cls_get_features(cls_method_context_t hctx); extern uint64_t cls_get_client_features(cls_method_context_t hctx); extern ceph_release_t cls_get_required_osd_release(cls_method_context_t hctx); +extern ceph_release_t cls_get_min_compatible_client(cls_method_context_t hctx); /* helpers */ extern void cls_cxx_subop_version(cls_method_context_t hctx, std::string *s); diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc index 9a3a0cb4a7d..f653f791903 100644 --- a/src/test/librados_test_stub/LibradosTestStub.cc +++ b/src/test/librados_test_stub/LibradosTestStub.cc @@ -1482,6 +1482,10 @@ ceph_release_t cls_get_required_osd_release(cls_handle_t hclass) { return ceph_release_t::nautilus; } +ceph_release_t cls_get_min_compatible_client(cls_handle_t hclass) { + return ceph_release_t::nautilus; +} + // stubs to silence TestClassHandler::open_class() PGLSFilter::~PGLSFilter() {} |