From: Sage Weil Date: Tue, 20 May 2014 22:04:03 +0000 (-0700) Subject: mds: reset mds_stamp for readdir, rename, link X-Git-Tag: v0.82~57^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d4bfa39fd31721b8f8ded21408fa029088e9f488;p=ceph.git mds: reset mds_stamp for readdir, rename, link These ops to complicated work prior to starting the real operation, like fetching missing directories, or opening remote dirfrags, creating snaprealms. Reset the mds timestamp after this slow work has completed. Signed-off-by: Sage Weil --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 116971bac7e9..fca2ea77e237 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2886,6 +2886,7 @@ void Server::handle_client_readdir(MDRequestRef& mdr) #endif utime_t now = ceph_clock_now(NULL); + mdr->set_mds_stamp(now); mdr->now = ceph_clock_now(g_ceph_context); snapid_t snapid = mdr->snapid; @@ -4404,6 +4405,8 @@ void Server::_link_remote(MDRequestRef& mdr, bool inc, CDentry *dn, CInode *targ assert(g_conf->mds_kill_link_at != 2); + mdr->set_mds_stamp(ceph_clock_now(NULL)); + // add to event mdr->ls = mdlog->get_current_segment(); EUpdate *le = new EUpdate(mdlog, inc ? "link_remote":"unlink_remote"); @@ -5775,6 +5778,9 @@ void Server::handle_client_rename(MDRequestRef& mdr) if (!mdr->more()->slaves.empty() && srci->is_dir()) assert(g_conf->mds_kill_rename_at != 4); + // -- declare now -- + mdr->set_mds_stamp(ceph_clock_now(g_ceph_context)); + // -- prepare journal entry -- mdr->ls = mdlog->get_current_segment(); EUpdate *le = new EUpdate(mdlog, "rename");