mds: include timestamp in MClientRequest

Signed-off-by: Sage Weil <sage@inktank.com>
client: set timestamp in MDS requests

Signed-off-by: Sage Weil <sage@inktank.com>
mds: add {mds,op}_stamp to Mutation

With getters, setters.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: set mds_stamp on lock acquisition

Normally acquire_locks() will set this for us.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: make sure mds_stamp is set when we journal

This is a catch-all that we are carrying over from before.  It may not
be strictly necessary, but I'm not inclined to check the code for
Mutation users who didn't call acquire_locks().

Signed-off-by: Sage Weil <sage@inktank.com>
mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp

Use the op (client) timestamp for the recursive stats, for santity's sake.
Note that since this is monotonically increasing, the danger here is
that we lose track of nested changes due to skewed client clocks.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: do the balancer and propagation timers based on mds_stmap

Use the (more) stable time stamp for doing the balancer's temperature
tracking and associated decay.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: use client-provided time stamp for user-visible file metadata

Use the op_stamp from the MDRequest, populated by the MClientRequest when
possible, for setting timestamps on user-visible metadata (like ctime,
mtime).

Signed-off-by: Sage Weil <sage@inktank.com>
mds: use real timestamp for readdir leases

Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>
mds: remove unused Mutation::now

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1838 from ceph/wip-client-time

fs: include client timestamp in all mds requests

Reviewed-by: Greg Farnum <greg@inktank.com>