Skip to content

Commit ae357a0

Browse files
authored
Merge pull request ceph#58037 from Suyashd999/refractor-PrimaryLogPG
osd/PrimaryLogPG.cc bl length would be stored before moving Reviewed-by: Pere Diaz Bou <[email protected]> Reviewed-by: Nitzan Mordechai <[email protected]> Reviewed-by: Ronen Friedman <[email protected]>
2 parents be941ad + 9e0744f commit ae357a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/osd/PrimaryLogPG.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6140,11 +6140,12 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
61406140
int r = osd->store->fiemap(ch, ghobject_t(soid, ghobject_t::NO_GEN,
61416141
info.pgid.shard),
61426142
op.extent.offset, op.extent.length, bl);
6143-
osd_op.outdata = std::move(bl);
6143+
auto bl_length = bl.length();
6144+
osd_op.outdata = std::move(bl);
61446145
if (r < 0)
61456146
result = r;
61466147
else
6147-
ctx->delta_stats.num_rd_kb += shift_round_up(bl.length(), 10);
6148+
ctx->delta_stats.num_rd_kb += shift_round_up(bl_length, 10);
61486149
ctx->delta_stats.num_rd++;
61496150
dout(10) << " map_extents done on object " << soid << dendl;
61506151
}

0 commit comments

Comments
 (0)