]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: clean up the sparse-read related code
authorXiubo Li <xiubli@redhat.com>
Tue, 17 Oct 2023 02:04:33 +0000 (10:04 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 2 Nov 2023 01:34:21 +0000 (09:34 +0800)
Just clean up the code and nothing fixed to make the code to be
more readable.

Fixes: https://tracker.ceph.com/issues/63318
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/osd/PGBackend.h
src/osd/PrimaryLogPG.cc
src/osd/ReplicatedBackend.cc
src/osd/ReplicatedBackend.h

index a0919e1d87f57bb3a101d31ceadb413aaf6ec6cc..ac17f05035db059b33fc49ebc4eac3694e7f0685 100644 (file)
@@ -568,7 +568,7 @@ typedef std::shared_ptr<const OSDMap> OSDMapRef;
 
    virtual int objects_readv_sync(
      const hobject_t &hoid,
-     std::map<uint64_t, uint64_t>&& m,
+     std::map<uint64_t, uint64_t>& m,
      uint32_t op_flags,
      ceph::buffer::list *bl) {
      return -EOPNOTSUPP;
index c1384412a35c6057caa0f44048887c04b2717979..f548fc544e38d0c3d055fffaa6476b48735f374e 100644 (file)
@@ -5931,7 +5931,7 @@ int PrimaryLogPG::do_sparse_read(OpContext *ctx, OSDOp& osd_op) {
     }
 
     bufferlist data_bl;
-    r = pgbackend->objects_readv_sync(soid, std::move(m), op.flags, &data_bl);
+    r = pgbackend->objects_readv_sync(soid, m, op.flags, &data_bl);
     if (r == -EIO) {
       r = rep_repair_primary_object(soid, ctx);
     }
index a2a3312399c7eab4f3cec75604a4eb7a5a85f65a..8fd2d2022f81f0c9caae08fe1c30e64c9d5bddd1 100644 (file)
@@ -275,7 +275,7 @@ int ReplicatedBackend::objects_read_sync(
 
 int ReplicatedBackend::objects_readv_sync(
   const hobject_t &hoid,
-  map<uint64_t, uint64_t>&& m,
+  map<uint64_t, uint64_t>& m,
   uint32_t op_flags,
   bufferlist *bl)
 {
index 0800c8ab024d18be5e3822cc0ce5b57192480ef9..41b634269ba00e6bd508d5275e67a88e83bca9a4 100644 (file)
@@ -142,7 +142,7 @@ public:
 
   int objects_readv_sync(
     const hobject_t &hoid,
-    std::map<uint64_t, uint64_t>&& m,
+    std::map<uint64_t, uint64_t>& m,
     uint32_t op_flags,
     ceph::buffer::list *bl) override;