From: Sage Weil Date: Tue, 20 May 2014 21:50:46 +0000 (-0700) Subject: mds: add {mds,op}_stamp to Mutation X-Git-Tag: v0.82~57^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4c9c34136d057276b928f50099055a831eda8db;p=ceph.git mds: add {mds,op}_stamp to Mutation With getters, setters. Signed-off-by: Sage Weil --- diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h index 2f192668104b..9dadfc98f5ca 100644 --- a/src/mds/Mutation.h +++ b/src/mds/Mutation.h @@ -41,6 +41,11 @@ struct MutationImpl { LogSegment *ls; // the log segment i'm committing to utime_t now; +private: + utime_t mds_stamp; ///< mds-local timestamp (real time) + utime_t op_stamp; ///< op timestamp (client provided) + +public: // flag mutation as slave int slave_to_mds; // this is a slave request if >= 0. @@ -114,6 +119,21 @@ struct MutationImpl { return -1; } + void set_mds_stamp(utime_t t) { + mds_stamp = t; + } + utime_t get_mds_stamp() const { + return mds_stamp; + } + void set_op_stamp(utime_t t) { + op_stamp = t; + } + utime_t get_op_stamp() const { + if (op_stamp != utime_t()) + return op_stamp; + return get_mds_stamp(); + } + // pin items in cache void pin(MDSCacheObject *o); void unpin(MDSCacheObject *o);