From: Samuel Just Date: Wed, 29 Sep 2021 19:29:23 +0000 (-0700) Subject: Merge pull request #43340 from athanatos/sjust/wip-seastore-throttle X-Git-Tag: v17.1.0~780 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e2b05287d50c715cd0bfefece15d08c6d90719ea;p=ceph.git Merge pull request #43340 from athanatos/sjust/wip-seastore-throttle crimson/seastore: fix segment_cleaner blocked_io_wake crash Reviewed-by: Xuehan Xu --- e2b05287d50c715cd0bfefece15d08c6d90719ea diff --cc src/crimson/os/seastore/transaction.h index af26ae63c5845,7d83c0a989176..e0a1a9f4b3cd3 --- a/src/crimson/os/seastore/transaction.h +++ b/src/crimson/os/seastore/transaction.h @@@ -187,14 -185,16 +187,20 @@@ public std::for_each(inline_block_list.begin(), inline_block_list.end(), f); } - auto get_num_fresh_blocks() const { - return inline_block_list.size() + ool_block_list.size(); + struct io_stat_t { + uint64_t num = 0; + uint64_t bytes = 0; + }; + const io_stat_t& get_fresh_block_stats() const { + return fresh_block_stats; } + size_t get_allocation_size() const { + size_t ret = 0; + for_each_fresh_block([&ret](auto &e) { ret += e->get_length(); }); + return ret; + } + enum class src_t : uint8_t { MUTATE = 0, READ, // including weak and non-weak read transactions