]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: set returned read length in op.extent.length not in rval 45518/head
authorChunmei Liu <chunmei.liu@intel.com>
Fri, 18 Mar 2022 05:42:32 +0000 (22:42 -0700)
committerChunmei Liu <chunmei.liu@intel.com>
Fri, 18 Mar 2022 05:47:00 +0000 (22:47 -0700)
rval set to be zero, means read success.
otherwise CReadOpsTest failed.

Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
src/crimson/osd/pg_backend.cc

index 510e30394bae2279909f9b200c07108223a4bc3e..76c19c11bbcd44056e73c5ce38928ffabff7b552 100644 (file)
@@ -216,7 +216,8 @@ PGBackend::read(const ObjectState& os, OSDOp& osd_op,
       return crimson::ct_error::object_corrupted::make();
     }
     logger().debug("read: data length: {}", bl.length());
-    osd_op.rval = bl.length();
+    osd_op.op.extent.length = bl.length();
+    osd_op.rval = 0;
     delta_stats.num_rd++;
     delta_stats.num_rd_kb += shift_round_up(bl.length(), 10);
     osd_op.outdata = std::move(bl);