]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore: simplify flag translation logic
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 4 Jun 2016 09:43:58 +0000 (17:43 +0800)
committerSage Weil <sage@redhat.com>
Mon, 6 Jun 2016 13:10:49 +0000 (09:10 -0400)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/bluestore_types.cc

index 41239d8b1fc19ac9f5e9a7c1f4740828bb8e058b..b98a6e1c295299fc6eae4f9b63bf4cd75d3654bb 100644 (file)
@@ -104,9 +104,7 @@ string bluestore_extent_t::get_flags_string(unsigned flags)
 {
   string s;
   if (flags & FLAG_SHARED) {
-    if (s.length())
-      s += '+';
-    s += "shared";
+    s = "shared";
   }
   return s;
 }
@@ -438,9 +436,7 @@ string bluestore_blob_t::get_flags_string(unsigned flags)
 {
   string s;
   if (flags & FLAG_MUTABLE) {
-    if (s.length())
-      s += '+';
-    s += "mutable";
+    s = "mutable";
   }
   if (flags & FLAG_COMPRESSED) {
     if (s.length())