From: Sage Weil Date: Tue, 15 Dec 2015 20:13:08 +0000 (-0500) Subject: os/bluestore/bluestore_types: add extent FLAG_COW_{HEAD,TAIL} X-Git-Tag: v10.0.3~154^2~73 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd75b4e44fb410407e4154df963470d30962d1e3;p=ceph.git os/bluestore/bluestore_types: add extent FLAG_COW_{HEAD,TAIL} Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/bluestore_types.cc b/src/os/bluestore/bluestore_types.cc index 8413f948d17..651e29b3e27 100644 --- a/src/os/bluestore/bluestore_types.cc +++ b/src/os/bluestore/bluestore_types.cc @@ -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; } diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 1e1abe5b020..69f60d41651 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -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);