]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make 'pg deep-scrub' command initiate a scrub 43244/head
authorRonen Friedman <rfriedma@redhat.com>
Tue, 21 Sep 2021 17:36:35 +0000 (17:36 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 11 Nov 2021 09:13:48 +0000 (09:13 +0000)
as the 'pg scrub' command does so.

Both commands push the 'last [deep] scrub' (respectively) back, to
cause the relevant type of scrub to be selected the next time we look for a PG to
scrub. But only the 'shallow' scrub timestamp is considered when deciding whether
a pg should be scrubbed.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PrimaryLogPG.cc

index 298716a1a0c7137762be8afe8ae873c1e4209749..d116e07d75cf16ade8354662bfd5d49cf20fd862 100644 (file)
@@ -1178,9 +1178,8 @@ void PrimaryLogPG::do_command(
       stamp -= 100.0;  // push back last scrub more for good measure
       if (deep) {
         set_last_deep_scrub_stamp(stamp);
-      } else {
-        set_last_scrub_stamp(stamp); // also for 'deep', as we use this value to order scrubs
       }
+      set_last_scrub_stamp(stamp); // for 'deep' as well, as we use this value to order scrubs
       f->open_object_section("result");
       f->dump_bool("deep", deep);
       f->dump_stream("stamp") << stamp;