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 <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-05-20 15:07:07 -07:00
parent d4bfa39fd3
commit 8768857061

View 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;