mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
objclass: add cls_get_features
Expose cls methods to the current OSDMap features set. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
5290133107
commit
eef9cfaada
@ -677,6 +677,12 @@ int cls_current_subop_num(cls_method_context_t hctx)
|
||||
return ctx->current_osd_subop_num;
|
||||
}
|
||||
|
||||
uint64_t cls_get_features(cls_method_context_t hctx)
|
||||
{
|
||||
ReplicatedPG::OpContext *ctx = *(ReplicatedPG::OpContext **)hctx;
|
||||
return ctx->pg->get_osdmap()->get_up_osd_features();
|
||||
}
|
||||
|
||||
void cls_cxx_subop_version(cls_method_context_t hctx, string *s)
|
||||
{
|
||||
if (!s)
|
||||
|
@ -193,6 +193,7 @@ extern int cls_gen_rand_base64(char *dest, int size); /* size should be the requ
|
||||
/* environment */
|
||||
extern uint64_t cls_current_version(cls_method_context_t hctx);
|
||||
extern int cls_current_subop_num(cls_method_context_t hctx);
|
||||
extern uint64_t cls_get_features(cls_method_context_t hctx);
|
||||
|
||||
/* helpers */
|
||||
extern void cls_cxx_subop_version(cls_method_context_t hctx, string *s);
|
||||
|
@ -1183,6 +1183,10 @@ int cls_cxx_list_watchers(cls_method_context_t hctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t cls_get_features(cls_method_context_t hctx) {
|
||||
return CEPH_FEATURES_DEFAULT_SUPPORTED;
|
||||
}
|
||||
|
||||
int cls_log(int level, const char *format, ...) {
|
||||
int size = 256;
|
||||
va_list ap;
|
||||
|
Loading…
Reference in New Issue
Block a user