]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction: rearrange to put private members at end
authorSamuel Just <sjust@redhat.com>
Wed, 26 Aug 2020 21:13:32 +0000 (14:13 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 19 Oct 2020 22:18:14 +0000 (15:18 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/transaction.h

index c2cb3090d0c6bb5a97e201efaedbe3a33b0ee7cb..43500d0356c883f8be2998fc7d616251b8398fee 100644 (file)
@@ -17,21 +17,8 @@ namespace crimson::os::seastore {
  * Representation of in-progress mutation. Used exclusively through Cache methods.
  */
 class Transaction {
-  friend class Cache;
-
-  RootBlockRef root;        ///< ref to root if read or written by transaction
-
-  segment_off_t offset = 0; ///< relative offset of next block
-
-  pextent_set_t read_set;   ///< set of extents read by paddr
-  ExtentIndex write_set;    ///< set of extents written by paddr
-
-  std::list<CachedExtentRef> fresh_block_list;   ///< list of fresh blocks
-  std::list<CachedExtentRef> mutated_block_list; ///< list of mutated blocks
-
-  pextent_set_t retired_set; ///< list of extents mutated by this transaction
-
 public:
+  using Ref = std::unique_ptr<Transaction>;
   enum class get_extent_ret {
     PRESENT,
     ABSENT,
@@ -98,8 +85,23 @@ public:
   const auto &get_retired_set() {
     return retired_set;
   }
+
+private:
+  friend class Cache;
+
+  RootBlockRef root;        ///< ref to root if read or written by transaction
+
+  segment_off_t offset = 0; ///< relative offset of next block
+
+  pextent_set_t read_set;   ///< set of extents read by paddr
+  ExtentIndex write_set;    ///< set of extents written by paddr
+
+  std::list<CachedExtentRef> fresh_block_list;   ///< list of fresh blocks
+  std::list<CachedExtentRef> mutated_block_list; ///< list of mutated blocks
+
+  pextent_set_t retired_set; ///< list of extents mutated by this transaction
 };
-using TransactionRef = std::unique_ptr<Transaction>;
+using TransactionRef = Transaction::Ref;
 
 inline TransactionRef make_transaction() {
   return std::make_unique<Transaction>();