]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/async_cleaner: add comments to clarify what kind of 55889/head
authorXuehan Xu <xuxuehan@qianxin.com>
Sat, 2 Mar 2024 09:36:33 +0000 (17:36 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 4 Mar 2024 05:09:14 +0000 (13:09 +0800)
extents would be considered dead by the cleaner

This could prevent future developers from rendering the cleaner abnormal
unexpectedly

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/async_cleaner.cc

index fd043f4ea35e67eaa9f3a00e6fa7879875b5953c..7fe6237eea36c4cdfe48c9a2b2be782e91e8f99a 100644 (file)
@@ -1057,6 +1057,15 @@ SegmentCleaner::do_reclaim_space(
     std::size_t &reclaimed,
     std::size_t &runs)
 {
+  // Extents satisfying any of the following requirements
+  // are considered DEAD:
+  // 1. can't find the corresponding mapping in both the
+  //   backref tree and the backref cache;
+  // 2. the extent is logical, but its lba mapping doesn't
+  //   exist in the lba tree or the lba mapping in the lba
+  //   tree doesn't match the extent's paddr
+  // 3. the extent is physical and doesn't exist in the
+  //   lba tree, backref tree or backref cache;
   return repeat_eagain([this, &backref_extents,
                         &pin_list, &reclaimed, &runs] {
     reclaimed = 0;