]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Server: improve reclaim_session code
authordparmar18 <dparmar@redhat.com>
Thu, 28 Jul 2022 11:09:07 +0000 (16:39 +0530)
committerdparmar18 <dparmar@redhat.com>
Mon, 26 Sep 2022 11:59:12 +0000 (17:29 +0530)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit c62ac888ccffb0799590174d4e353a64e12e4303)

src/mds/Server.cc

index a04b441ed9a0e8ca71b851022bee78c47956750f..400ff5266fb2b240f3e07c2c880cef2a69a0f763 100644 (file)
@@ -435,7 +435,7 @@ void Server::reclaim_session(Session *session, const cref_t<MClientReclaim> &m)
   unsigned flags = m->get_flags();
   if (flags != CEPH_RECLAIM_RESET) { // currently only support reset
     dout(10) << __func__ << " unsupported flags" << dendl;
-    reply->set_result(-CEPHFS_EOPNOTSUPP);
+    reply->set_result(-CEPHFS_EINVAL);
     mds->send_message_client(reply, session);
     return;
   }
@@ -457,10 +457,7 @@ void Server::reclaim_session(Session *session, const cref_t<MClientReclaim> &m)
 
   if (flags & CEPH_RECLAIM_RESET) {
     finish_reclaim_session(session, reply);
-    return;
-  }
-
-  ceph_abort();
+  } else ceph_assert(0); /* no other flags are handled at this time */
 }
 
 void Server::finish_reclaim_session(Session *session, const ref_t<MClientReclaimReply> &reply)