]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #43340 from athanatos/sjust/wip-seastore-throttle
authorSamuel Just <sjust@redhat.com>
Wed, 29 Sep 2021 19:29:23 +0000 (12:29 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Sep 2021 19:29:23 +0000 (12:29 -0700)
crimson/seastore: fix segment_cleaner blocked_io_wake crash

Reviewed-by: Xuehan Xu <xxhdx1985126@gmail.com>
1  2 
src/crimson/os/seastore/transaction.h

index af26ae63c5845384e68bccb64e16a9bb36cd6877,7d83c0a98917668ddaea6f4a5fc09dacd237b239..e0a1a9f4b3cd34ee000bcfe237f8ff5b4a02b818
@@@ -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