]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use mds_stamp for mksnap
authorSage Weil <sage@inktank.com>
Tue, 20 May 2014 22:07:07 +0000 (15:07 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 May 2014 22:07:07 +0000 (15:07 -0700)
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 <sage@inktank.com>
src/mds/Server.cc

index fca2ea77e237888a0a5f2beb8f8ddfdc59873290..c2001870b4333cb89b712c42711e62db76e62fdd 100644 (file)
@@ -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;