]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluestore_types: add extent FLAG_COW_{HEAD,TAIL}
authorSage Weil <sage@redhat.com>
Tue, 15 Dec 2015 20:13:08 +0000 (15:13 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:25 +0000 (13:07 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/bluestore_types.cc
src/os/bluestore/bluestore_types.h

index 8413f948d17a5b2591b08860566f906f2e21135b..651e29b3e27d738f0eaa2815607f039d6ca9aa9b 100644 (file)
@@ -112,6 +112,16 @@ string bluestore_extent_t::get_flags_string(unsigned flags)
       s += '+';
     s += "shared";
   }
+  if (flags & FLAG_COW_HEAD) {
+    if (s.length())
+      s += '+';
+    s += "cow_head";
+  }
+  if (flags & FLAG_COW_TAIL) {
+    if (s.length())
+      s += '+';
+    s += "cow_tail";
+  }
   return s;
 }
 
index 1e1abe5b020284fc41e553ef46b34f4c6b0272e9..69f60d416519bbc9712e1e6c49d9e07eded6bd30 100644 (file)
@@ -59,6 +59,8 @@ struct bluestore_extent_t {
   enum {
     FLAG_UNWRITTEN = 1,   ///< extent is unwritten (and defined to be zero)
     FLAG_SHARED = 2,      ///< extent is shared by another object, and refcounted
+    FLAG_COW_HEAD = 4,    ///< extent has pending wal OP_COPY for head
+    FLAG_COW_TAIL = 8,    ///< extent has pending wal OP_COPY for tail
   };
   static string get_flags_string(unsigned flags);