mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #18610 from cbodley/wip-osd-subop-num
osd: add processed_subop_count for cls_cxx_subop_version() Reviewed-by: Jason Dillaman <dillaman@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
223f45e4e1
5
qa/workunits/cls/test_cls_log.sh
Executable file
5
qa/workunits/cls/test_cls_log.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
ceph_test_cls_log
|
||||
|
||||
exit 0
|
@ -677,7 +677,7 @@ int cls_current_subop_num(cls_method_context_t hctx)
|
||||
{
|
||||
PrimaryLogPG::OpContext *ctx = *(PrimaryLogPG::OpContext **)hctx;
|
||||
|
||||
return ctx->current_osd_subop_num;
|
||||
return ctx->processed_subop_count;
|
||||
}
|
||||
|
||||
uint64_t cls_get_features(cls_method_context_t hctx)
|
||||
|
@ -4944,7 +4944,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
|
||||
dout(10) << "do_osd_op " << soid << " " << ops << dendl;
|
||||
|
||||
ctx->current_osd_subop_num = 0;
|
||||
for (vector<OSDOp>::iterator p = ops.begin(); p != ops.end(); ++p, ctx->current_osd_subop_num++) {
|
||||
for (auto p = ops.begin(); p != ops.end(); ++p, ctx->current_osd_subop_num++, ctx->processed_subop_count++) {
|
||||
OSDOp& osd_op = *p;
|
||||
ceph_osd_op& op = osd_op.op;
|
||||
|
||||
|
@ -536,7 +536,10 @@ public:
|
||||
eversion_t at_version; // pg's current version pointer
|
||||
version_t user_at_version; // pg's current user version pointer
|
||||
|
||||
/// index of the current subop - only valid inside of do_osd_ops()
|
||||
int current_osd_subop_num;
|
||||
/// total number of subops processed in this context for cls_cxx_subop_version()
|
||||
int processed_subop_count = 0;
|
||||
|
||||
PGTransactionUPtr op_t;
|
||||
vector<pg_log_entry_t> log;
|
||||
|
@ -14,4 +14,6 @@ target_link_libraries(ceph_test_cls_log
|
||||
${CRYPTO_LIBS}
|
||||
${EXTRALIBS}
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
ceph_test_cls_log
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
Loading…
Reference in New Issue
Block a user