]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/cache: stop at any newly dirty extents in get_next_dirty_extents
authorSamuel Just <sjust@redhat.com>
Thu, 18 Mar 2021 22:21:57 +0000 (15:21 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 24 Mar 2021 05:41:11 +0000 (22:41 -0700)
Any extent with dirty_from == journal_seq_t() is in the process of being
dirtied for the first time and hasn't had dirty_from filled in yet.  As
such, its dirty_from will end up being after the current journal_head.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cache.cc

index 619971bf2bb9c5ea5162f3e8ea7a433acb5bab67..c48ab73df8cd25ce941166171dca72182a7f51fa 100644 (file)
@@ -452,7 +452,7 @@ Cache::get_next_dirty_extents_ret Cache::get_next_dirty_extents(
   std::vector<CachedExtentRef> ret;
   for (auto i = dirty.begin(); i != dirty.end(); ++i) {
     CachedExtentRef cand;
-    if (i->dirty_from < seq) {
+    if (i->dirty_from != journal_seq_t() && i->dirty_from < seq) {
       logger().debug(
        "Cache::get_next_dirty_extents: next {}",
        *i);