]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: replacing list::size() with list::empty() in some scrub code
authorRonen Friedman <rfriedma@redhat.com>
Thu, 28 Jan 2021 14:28:15 +0000 (16:28 +0200)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 28 Jan 2021 17:21:06 +0000 (19:21 +0200)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PG.cc

index 5a01fac7fb0d190dff08cb9a77f05ca524c435ef..df8c4f3451d4adce2a00aba69017727520e84b14 100644 (file)
@@ -2183,13 +2183,13 @@ void PG::scrub_send_replmaps_ready(epoch_t epoch_queued,
 
 bool PG::ops_blocked_by_scrub() const
 {
-  return (waiting_for_scrub.size() != 0);
+  return !waiting_for_scrub.empty();
 }
 
 Scrub::scrub_prio_t PG::is_scrub_blocking_ops() const
 {
-  return waiting_for_scrub.size() ? Scrub::scrub_prio_t::high_priority
-                                 : Scrub::scrub_prio_t::low_priority;
+  return waiting_for_scrub.empty() ? Scrub::scrub_prio_t::low_priority
+                                  : Scrub::scrub_prio_t::high_priority;
 }
 
 bool PG::old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch)