]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: shuffle ECUtil::stripe_info_t::aligned_offset_len_to_chunk to .cc
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 16 Jan 2024 14:09:51 +0000 (14:09 +0000)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Mon, 3 Jun 2024 12:52:31 +0000 (14:52 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/osd/ECUtil.cc
src/osd/ECUtil.h

index e1cb9de43e09b9103c6f36058d4bce1a691503e4..2a20692630fff801ca7df4730c183b149c33e3aa 100644 (file)
@@ -9,6 +9,15 @@ using ceph::bufferlist;
 using ceph::ErasureCodeInterfaceRef;
 using ceph::Formatter;
 
+std::pair<uint64_t, uint64_t> ECUtil::stripe_info_t::aligned_offset_len_to_chunk(
+  std::pair<uint64_t, uint64_t> in) const {
+  // we need to align to stripe again to deal with partial chunk read.
+  std::pair<uint64_t, uint64_t> aligned = offset_len_to_stripe_bounds(in);
+  return std::make_pair(
+    aligned_logical_offset_to_chunk_offset(aligned.first),
+    aligned_logical_offset_to_chunk_offset(aligned.second));
+}
+
 int ECUtil::decode(
   const stripe_info_t &sinfo,
   ErasureCodeInterfaceRef &ec_impl,
index 28c2f3bd69da459c3e79426d1f4c8d3c29d079a8..2ea72528aae495acd233a48359020bf92fbc51ac 100644 (file)
@@ -65,13 +65,7 @@ public:
     return (offset / chunk_size) * stripe_width;
   }
   std::pair<uint64_t, uint64_t> aligned_offset_len_to_chunk(
-    std::pair<uint64_t, uint64_t> in) const {
-    // we need to align to stripe again to deal with partial chunk read.
-    std::pair<uint64_t, uint64_t> aligned = offset_len_to_stripe_bounds(in);
-    return std::make_pair(
-      aligned_logical_offset_to_chunk_offset(aligned.first),
-      aligned_logical_offset_to_chunk_offset(aligned.second));
-  }
+    std::pair<uint64_t, uint64_t> in) const;
   std::pair<uint64_t, uint64_t> offset_len_to_stripe_bounds(
     std::pair<uint64_t, uint64_t> in) const {
     uint64_t off = logical_to_prev_stripe_offset(in.first);