From: Samuel Just Date: Tue, 26 May 2020 18:15:28 +0000 (-0700) Subject: crimson/os/seastore/cache.h: only retire extent if not already retired and not fresh X-Git-Tag: v16.1.0~2167^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fbdcd25edbea41847ba6b9d1d48c8f502f556321;p=ceph.git crimson/os/seastore/cache.h: only retire extent if not already retired and not fresh Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/seastore/cache.h b/src/crimson/os/seastore/cache.h index f0b5faf96aee..3007ba6d2294 100644 --- a/src/crimson/os/seastore/cache.h +++ b/src/crimson/os/seastore/cache.h @@ -50,8 +50,12 @@ class Transaction { } void add_to_retired_set(CachedExtentRef ref) { - ceph_assert(retired_set.count(ref->get_paddr()) == 0); - retired_set.insert(ref); + if (!ref->is_initial_pending()) { + // && retired_set.count(ref->get_paddr()) == 0 + // If it's already in the set, insert here will be a noop, + // which is what we want. + retired_set.insert(ref); + } } void add_to_read_set(CachedExtentRef ref) {