]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
refactored the code to remove use-after-move warning generation. bl length would... 58037/head
authorSuyash Dongre <suyashd999@gmail.com>
Thu, 13 Jun 2024 15:16:12 +0000 (20:46 +0530)
committerSuyash Dongre <suyashd999@gmail.com>
Thu, 13 Jun 2024 15:50:02 +0000 (21:20 +0530)
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
src/osd/PrimaryLogPG.cc

index a7e6d90a8fe10b9e62f287b81e856364a760d1e7..1f77f74cea30960671cd025976252af52ad87cc3 100644 (file)
@@ -6130,11 +6130,12 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
        int r = osd->store->fiemap(ch, ghobject_t(soid, ghobject_t::NO_GEN,
                                                  info.pgid.shard),
                                   op.extent.offset, op.extent.length, bl);
-       osd_op.outdata = std::move(bl);
+       auto bl_length = bl.length();
+        osd_op.outdata = std::move(bl);
        if (r < 0)
          result = r;
        else
-         ctx->delta_stats.num_rd_kb += shift_round_up(bl.length(), 10);
+         ctx->delta_stats.num_rd_kb += shift_round_up(bl_length, 10);
        ctx->delta_stats.num_rd++;
        dout(10) << " map_extents done on object " << soid << dendl;
       }