From: Samuel Just Date: Wed, 26 Aug 2020 21:13:32 +0000 (-0700) Subject: crimson/os/seastore/transaction: rearrange to put private members at end X-Git-Tag: v16.1.0~807^2~29 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bed1b7bb304e949d36eab79aa3ce05f03aef3b67;p=ceph.git crimson/os/seastore/transaction: rearrange to put private members at end Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/seastore/transaction.h b/src/crimson/os/seastore/transaction.h index c2cb3090d0c6..43500d0356c8 100644 --- a/src/crimson/os/seastore/transaction.h +++ b/src/crimson/os/seastore/transaction.h @@ -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 fresh_block_list; ///< list of fresh blocks - std::list 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; 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 fresh_block_list; ///< list of fresh blocks + std::list mutated_block_list; ///< list of mutated blocks + + pextent_set_t retired_set; ///< list of extents mutated by this transaction }; -using TransactionRef = std::unique_ptr; +using TransactionRef = Transaction::Ref; inline TransactionRef make_transaction() { return std::make_unique();