]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: drop old bluestore_extent_t
authorSage Weil <sage@redhat.com>
Wed, 15 Jun 2016 09:17:30 +0000 (05:17 -0400)
committerSage Weil <sage@redhat.com>
Thu, 16 Jun 2016 19:49:43 +0000 (15:49 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/bluestore_types.cc
src/os/bluestore/bluestore_types.h
src/test/encoding/types.h

index 6ba849520cb74df905fc3d24abb109fcd7e0336a..cc0e1a6bd1dcae5f9531bebda52b17e9bac8ae0e 100644 (file)
@@ -98,39 +98,6 @@ void bluestore_cnode_t::generate_test_instances(list<bluestore_cnode_t*>& o)
   o.push_back(new bluestore_cnode_t(123));
 }
 
-// bluestore_extent_t
-
-string bluestore_extent_t::get_flags_string(unsigned flags)
-{
-  string s;
-  if (flags & FLAG_SHARED) {
-    s = "shared";
-  }
-  return s;
-}
-
-void bluestore_extent_t::dump(Formatter *f) const
-{
-  f->dump_unsigned("offset", offset);
-  f->dump_unsigned("length", length);
-  f->dump_unsigned("flags", flags);
-}
-
-void bluestore_extent_t::generate_test_instances(list<bluestore_extent_t*>& o)
-{
-  o.push_back(new bluestore_extent_t());
-  o.push_back(new bluestore_extent_t(123, 456));
-  o.push_back(new bluestore_extent_t(789, 1024, 322));
-}
-
-ostream& operator<<(ostream& out, const bluestore_extent_t& e)
-{
-  out << e.offset << "~" << e.length;
-  if (e.flags)
-    out << ":" << bluestore_extent_t::get_flags_string(e.flags);
-  return out;
-}
-
 // bluestore_extent_ref_map_t
 
 void bluestore_extent_ref_map_t::_check() const
index f47e81753602c50ff7c70a89d27d7647f5cae18c..db6f8661676f25e8c6fd36002ddca0ada4a54781 100644 (file)
@@ -54,52 +54,6 @@ struct bluestore_cnode_t {
 };
 WRITE_CLASS_ENCODER(bluestore_cnode_t)
 
-/// extent: a byte extent back by the block device
-struct bluestore_extent_t {
-  enum {
-    FLAG_SHARED = 2,      ///< extent is shared by another object, and refcounted
-  };
-  static string get_flags_string(unsigned flags);
-
-  uint64_t offset;
-  uint32_t length;
-  uint32_t flags;  /// or reserved
-
-  bluestore_extent_t(uint64_t o=0, uint32_t l=0, uint32_t f=0)
-    : offset(o), length(l), flags(f) {}
-
-  uint64_t end() const {
-    return offset + length;
-  }
-
-  bool has_flag(unsigned f) const {
-    return flags & f;
-  }
-  void set_flag(unsigned f) {
-    flags |= f;
-  }
-  void clear_flag(unsigned f) {
-    flags &= ~f;
-  }
-
-  void encode(bufferlist& bl) const {
-    ::encode(offset, bl);
-    ::encode(length, bl);
-    ::encode(flags, bl);
-  }
-  void decode(bufferlist::iterator& p) {
-    ::decode(offset, p);
-    ::decode(length, p);
-    ::decode(flags, p);
-  }
-  void dump(Formatter *f) const;
-  static void generate_test_instances(list<bluestore_extent_t*>& o);
-};
-WRITE_CLASS_ENCODER(bluestore_extent_t)
-
-ostream& operator<<(ostream& out, const bluestore_extent_t& bp);
-
-
 /// pextent: physical extent
 struct bluestore_pextent_t {
   const static uint64_t INVALID_OFFSET = ~0ull;
index 7a274ad82f11271d8feac2bb23ab4a061ff3ec9f..2594e4ac3f27f4ca0a06b6da069117d2e1572fb5 100644 (file)
@@ -119,7 +119,6 @@ TYPE(SequencerPosition)
 #include "os/bluestore/bluestore_types.h"
 TYPE(bluestore_cnode_t)
 TYPE(bluestore_compression_header_t)
-TYPE(bluestore_extent_t)
 TYPE(bluestore_extent_ref_map_t)
 TYPE(bluestore_overlay_t)
 TYPE(bluestore_pextent_t)