]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #38939 from ronen-fr/wip-ronenf-scrub-blocked
authorKefu Chai <kchai@redhat.com>
Fri, 25 Jun 2021 06:57:31 +0000 (14:57 +0800)
committerGitHub <noreply@github.com>
Fri, 25 Jun 2021 06:57:31 +0000 (14:57 +0800)
osd: issue a warning if the scrubber blocks for too long on an object

Reviewed-by: David Zafman <dzafman@redhat.com>
1  2 
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PrimaryLogPG.cc
src/osd/pg_scrubber.cc
src/osd/pg_scrubber.h
src/osd/scrub_machine.cc
src/osd/scrub_machine.h
src/osd/scrub_machine_lstnr.h
src/osd/scrubber_common.h

diff --cc src/osd/OSD.cc
Simple merge
diff --cc src/osd/OSD.h
Simple merge
Simple merge
Simple merge
index e6beecab3d722111f7779234627f245f8b771861,c63d949506416a8f0c76122f22afe8a2964e6d06..0145ae6515f285f7d98fe438af2d94f1e535b218
@@@ -139,9 -139,9 +139,10 @@@ class MapsCollectionStatus 
    friend ostream& operator<<(ostream& out, const MapsCollectionStatus& sf);
  };
  
  }  // namespace Scrub
  
 +
  /**
   * the scrub operation flags. Primary only.
   * Set at scrub start. Checked in multiple locations - mostly
@@@ -333,13 -319,21 +334,21 @@@ class PgScrubber : public ScrubPgIF, pu
                        scrub_ls_result_t& res_inout) const override
    {
      return false;
 -  };
 +  }
  
+   int asok_debug(std::string_view cmd,
+                std::string param,
+                Formatter* f,
+                stringstream& ss) override;
+   int m_debug_blockrange{0};
    // -------------------------------------------------------------------------------------------
    // the I/F used by the state-machine (i.e. the implementation of ScrubMachineListener)
  
 -  bool select_range() final;
 +  void select_range_n_notify() final;
  
+   Scrub::BlockedRangeWarning acquire_blocked_alarm() final;
    /// walk the log to find the latest update that affects our chunk
    eversion_t search_log_for_updates() const final;
  
Simple merge
Simple merge
index f0e652acec637c9343c9ec0e6f10e564fa87e841,87a5bf87d1f2b6a2716c686de3c2bb74ba3b4be4..167e5f618f51888284487e4ec09545ddd733c926
@@@ -44,15 -59,12 +56,17 @@@ using BlockedRangeWarning = std::unique
  
  struct ScrubMachineListener {
  
 -  virtual ~ScrubMachineListener(){};
 +  struct MsgAndEpoch {
 +    MessageRef m_msg;
 +    epoch_t m_epoch;
 +  };
  
 -  virtual bool select_range() = 0;
 +  virtual ~ScrubMachineListener() = default;
 +
 +  virtual void select_range_n_notify() = 0;
  
+   virtual Scrub::BlockedRangeWarning acquire_blocked_alarm() = 0;
    /// walk the log to find the latest update that affects our chunk
    virtual eversion_t search_log_for_updates() const = 0;
  
Simple merge