From 61c7d6b5483851e90e60d3a82b61740e7df559e6 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Sat, 2 Mar 2024 17:36:33 +0800 Subject: [PATCH] crimson/os/seastore/async_cleaner: add comments to clarify what kind of extents would be considered dead by the cleaner This could prevent future developers from rendering the cleaner abnormal unexpectedly Signed-off-by: Xuehan Xu --- src/crimson/os/seastore/async_cleaner.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/crimson/os/seastore/async_cleaner.cc b/src/crimson/os/seastore/async_cleaner.cc index fd043f4ea35e6..7fe6237eea36c 100644 --- a/src/crimson/os/seastore/async_cleaner.cc +++ b/src/crimson/os/seastore/async_cleaner.cc @@ -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; -- 2.39.5