From 8768857061714f8d51d2ee8d7764864f15a7d587 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 20 May 2014 15:07:07 -0700 Subject: [PATCH] mds: use mds_stamp for mksnap Use the server timestamp for the snapshot timestamp. This could arguably be the client timestamp, but I think snapshot creation times are a bit more important to have accurate timestamps on, and this should not be something that existing client apps will strongly depend on. Signed-off-by: Sage Weil --- src/mds/Server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index fca2ea77e23..c2001870b43 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -7327,7 +7327,8 @@ void Server::handle_client_mksnap(MDRequestRef& mdr) // allocate a snapid if (!mdr->more()->stid) { // prepare an stid - mds->snapclient->prepare_create(diri->ino(), snapname, mdr->now, + mds->snapclient->prepare_create(diri->ino(), snapname, + mdr->get_mds_stamp(), &mdr->more()->stid, &mdr->more()->snapidbl, new C_MDS_RetryRequest(mds->mdcache, mdr)); return;