Skip to content

Commit fbe60f1

Browse files
committed
crimson/os/seastore/2Q: don't add empty extents to the warm out queue
Fixes: https://tracker.ceph.com/issues/72529 Signed-off-by: Zhang Song <[email protected]>
1 parent 0542a5e commit fbe60f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/crimson/os/seastore/extent_pinboard.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,15 @@ class ExtentPinboardTwoQ : public ExtentPinboard {
630630
for (auto extent : extents) {
631631
ceph_assert(is_logical_type(extent->get_type()));
632632
extent->set_2q_state(extent_2q_state_t::Fresh);
633+
auto len = extent->get_loaded_length();
634+
if (len == 0) {
635+
// The extent is possibly empty after being initially split/remapped
636+
// by the ObjectDataHandler, we should only record non-empty extents
637+
// to the warm out queue.
638+
continue;
639+
}
633640
auto lext = extent->cast<LogicalCachedExtent>();
634641
auto laddr = lext->get_laddr();
635-
auto len = extent->get_loaded_length();
636642
auto end = extent->get_last_touch_end();
637643
// the extents evicted from warm_in queue will be recorded
638644
// in warm_out FIFO queue as recently accessed extents.

0 commit comments

Comments
 (0)