mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
objclass: expose client features to cls ops
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
f0cf281900
commit
ffee7155b5
@ -680,6 +680,12 @@ uint64_t cls_get_features(cls_method_context_t hctx)
|
||||
return ctx->pg->get_osdmap()->get_up_osd_features();
|
||||
}
|
||||
|
||||
uint64_t cls_get_client_features(cls_method_context_t hctx)
|
||||
{
|
||||
ReplicatedPG::OpContext *ctx = *(ReplicatedPG::OpContext **)hctx;
|
||||
return ctx->op->get_req()->get_connection()->get_features();
|
||||
}
|
||||
|
||||
void cls_cxx_subop_version(cls_method_context_t hctx, string *s)
|
||||
{
|
||||
if (!s)
|
||||
|
@ -194,6 +194,7 @@ extern int cls_gen_rand_base64(char *dest, int size); /* size should be the requ
|
||||
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);
|
||||
extern uint64_t cls_get_client_features(cls_method_context_t hctx);
|
||||
|
||||
/* helpers */
|
||||
extern void cls_cxx_subop_version(cls_method_context_t hctx, string *s);
|
||||
|
@ -1187,6 +1187,10 @@ uint64_t cls_get_features(cls_method_context_t hctx) {
|
||||
return CEPH_FEATURES_SUPPORTED_DEFAULT;
|
||||
}
|
||||
|
||||
uint64_t cls_get_client_features(cls_method_context_t hctx) {
|
||||
return CEPH_FEATURES_SUPPORTED_DEFAULT;
|
||||
}
|
||||
|
||||
int cls_log(int level, const char *format, ...) {
|
||||
int size = 256;
|
||||
va_list ap;
|
||||
|
Loading…
Reference in New Issue
Block a user