From 6668669604221bb09c940cd64921684a51f04220 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 19 Oct 2009 12:13:57 -0700 Subject: [PATCH] mon: log each client mount --- src/mon/ClientMonitor.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mon/ClientMonitor.cc b/src/mon/ClientMonitor.cc index f0ebba9bc6c17..46b2dfeefe64e 100644 --- a/src/mon/ClientMonitor.cc +++ b/src/mon/ClientMonitor.cc @@ -190,7 +190,6 @@ bool ClientMonitor::preprocess_mount(MClientMount *m) bool ClientMonitor::prepare_mount(MClientMount *m) { - stringstream ss; entity_addr_t addr = m->get_orig_source_addr(); assert(next_client <= client_map.next_client); @@ -203,8 +202,6 @@ bool ClientMonitor::prepare_mount(MClientMount *m) dout(10) << "mount: assigned client" << client << " to " << addr << dendl; paxos->wait_for_commit(new C_Mounted(this, client, (MClientMount*)m)); - ss << "client" << client << " " << addr; - mon->get_logclient()->log(LOG_INFO, ss); return true; } @@ -215,6 +212,10 @@ void ClientMonitor::_mounted(client_t client, MClientMount *m) to.name = entity_name_t::CLIENT(client.v); dout(10) << "_mounted client" << client << " at " << to << dendl; + + stringstream ss; + ss << "client" << client << " " << to.addr; + mon->get_logclient()->log(LOG_INFO, ss); // reply with client ticket MClientMountAck *ack = new MClientMountAck; -- 2.39.5