]> 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>
Thu, 25 Aug 2022 06:20:32 +0000 (11:50 +0530)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/mds/Server.cc

index fe82f82e5472299dbc271f2b798d48bc6d64e428..bad85091857b6b56eb6615cfc00f012038cf14ee 100644 (file)
@@ -439,7 +439,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;
   }
@@ -461,10 +461,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)