]> 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>
Fri, 28 Feb 2025 00:55:47 +0000 (19:55 -0500)
Ancillary change: do not do client upkeep after map processing.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/client/Client.cc

index f134f2e355d3718c70fb52c097fef4028308a788..51298d90a59a2dac4bafc5d48a9a44c2a11573f0 100644 (file)
@@ -3085,26 +3085,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
@@ -3132,8 +3132,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:
@@ -3141,7 +3142,7 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m)
     break;
 
   default:
-    return false;
+    return Dispatcher::UNHANDLED();
   }
 
   // unmounting?
@@ -3160,7 +3161,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)