]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: indicate maps are acked not processed
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 18 Feb 2025 18:45:22 +0000 (13:45 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 17 Mar 2025 19:43:22 +0000 (15:43 -0400)
Ancillary change: do not do client upkeep after map processing.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 2810ed0f60833d1c1806d2c84db3116b11f72e37)

src/client/Client.cc

index f62136f8d3bc37e959d403d58a080bd82e184cfa..ef8a640a9e854bcc418695f3685018d35425b1ac 100644 (file)
@@ -3070,26 +3070,26 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m)
   RWRef_t iref_reader(initialize_state, CLIENT_INITIALIZED);
   if (!iref_reader.is_state_satisfied()) {
     ldout(cct, 10) << "inactive, discarding " << *m << dendl;
-    return true;
+    return Dispatcher::UNHANDLED();
   }
 
   switch (m->get_type()) {
     // mounting and mds sessions
   case CEPH_MSG_MDS_MAP:
     handle_mds_map(ref_cast<MMDSMap>(m));
-    break;
+    return Dispatcher::ACKNOWLEDGED();
   case CEPH_MSG_FS_MAP:
     handle_fs_map(ref_cast<MFSMap>(m));
-    break;
+    return Dispatcher::ACKNOWLEDGED();
   case CEPH_MSG_FS_MAP_USER:
     handle_fs_map_user(ref_cast<MFSMapUser>(m));
-    break;
-  case CEPH_MSG_CLIENT_SESSION:
-    handle_client_session(ref_cast<MClientSession>(m));
-    break;
-
+    return Dispatcher::ACKNOWLEDGED();
   case CEPH_MSG_OSD_MAP:
     handle_osd_map(ref_cast<MOSDMap>(m));
+    return Dispatcher::ACKNOWLEDGED();
+
+  case CEPH_MSG_CLIENT_SESSION:
+    handle_client_session(ref_cast<MClientSession>(m));
     break;
 
     // requests
@@ -3117,8 +3117,9 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m)
   case MSG_COMMAND_REPLY:
     if (m->get_source().type() == CEPH_ENTITY_TYPE_MDS) {
       handle_command_reply(ref_cast<MCommandReply>(m));
+      return Dispatcher::HANDLED();
     } else {
-      return false;
+      return Dispatcher::UNHANDLED();
     }
     break;
   case CEPH_MSG_CLIENT_QUOTA:
@@ -3126,7 +3127,7 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m)
     break;
 
   default:
-    return false;
+    return Dispatcher::UNHANDLED();
   }
 
   // unmounting?
@@ -3145,7 +3146,7 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m)
     }
   }
 
-  return true;
+  return Dispatcher::HANDLED();
 }
 
 void Client::handle_fs_map(const MConstRef<MFSMap>& m)