mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
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 <sage@inktank.com>
This commit is contained in:
parent
a09547bbfc
commit
d4bfa39fd3
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user