]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't delay processing completed requests in replay queue 19157/head
authorYan, Zheng <zyan@redhat.com>
Mon, 20 Nov 2017 00:29:12 +0000 (08:29 +0800)
committerPrashant D <pdhange@redhat.com>
Thu, 1 Feb 2018 04:33:52 +0000 (23:33 -0500)
Completed requests can also be in replay queue, they need to be processed
(treated as lookup request) in clientreplay stage. MDS will be stuck at
clientreplay stage if it delays processing requests of this type.

the bug was introduced by commit 0afbc033
(mds: don't rdlock locks in replica object while auth mds is recovering)

Fixes: http://tracker.ceph.com/issues/22163
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 959fad28b2a1b6ad1e5f8597d04ceb9b1761b98a)

src/mds/Locker.cc
src/mds/Mutation.cc
src/mds/Mutation.h

index 714f675a532cce6a4b6472fb142f3edc89fc431e..329a47abf887ce8423bc06c661bb0da74668942a 100644 (file)
@@ -235,7 +235,7 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
          lock->get_type() == CEPH_LOCK_IPOLICY) &&
        mds->is_cluster_degraded() &&
        mdr->is_master() &&
-       !mdr->is_replay()) {
+       !mdr->is_queued_for_replay()) {
       // waiting for recovering mds, to guarantee replayed requests and mksnap/setlayout
       // get processed in proper order.
       bool wait = false;
@@ -587,7 +587,7 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
       assert(mdr->is_master());
       if ((*p)->needs_recover()) {
        if (mds->is_cluster_degraded()) {
-         if (!mdr->is_replay()) {
+         if (!mdr->is_queued_for_replay()) {
            // see comments in SimpleLock::set_state_rejoin() and
            // ScatterLock::encode_state_for_rejoin()
            drop_locks(mdr.get());
index 4e26b515896a209123a6dfe86ce460d6923bd40a..52c0ca2339da815238c24733546a233232db96c0 100644 (file)
@@ -313,9 +313,9 @@ void MDRequestImpl::set_filepath2(const filepath& fp)
   more()->filepath2 = fp;
 }
 
-bool MDRequestImpl::is_replay() const
+bool MDRequestImpl::is_queued_for_replay() const
 {
-  return client_request ? client_request->is_replay() : false;
+  return client_request ? client_request->is_queued_for_replay() : false;
 }
 
 void MDRequestImpl::print(ostream &out) const
index 4738f8a5c19600b479ad98773436576e95290f55..abf0078d78a306f0cde6b99ca1643c9880334fb0 100644 (file)
@@ -331,7 +331,7 @@ struct MDRequestImpl : public MutationImpl {
   const filepath& get_filepath2();
   void set_filepath(const filepath& fp);
   void set_filepath2(const filepath& fp);
-  bool is_replay() const;
+  bool is_queued_for_replay() const;
 
   void print(ostream &out) const override;
   void dump(Formatter *f) const override;