]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: simplify can_split_at()
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 22 Oct 2016 02:33:20 +0000 (10:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 22 Oct 2016 02:33:20 +0000 (10:33 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/bluestore_types.h

index e1babc66ba447f3d9b793713fb99760d20aefaf3..47f912e685d85d7a55049d0f43a079a06ca8d3e9 100644 (file)
@@ -418,10 +418,7 @@ struct bluestore_blob_t {
       !has_flag(FLAG_HAS_UNUSED);     // splitting unused set is complex
   }
   bool can_split_at(uint32_t blob_offset) const {
-    if (has_csum() &&
-       blob_offset % get_csum_chunk_size() != 0)
-      return false;
-    return true;
+    return !has_csum() || blob_offset % get_csum_chunk_size() == 0;
   }
 
   void dump(Formatter *f) const;