Make sure the mtime is updated every time you call ReadOp::prepare() via
RadosStore. Uninitialized mtime is the epoch (Jan 1 1970).
Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
(cherry picked from commit
b664449e89bfc22cd6f062ad7dc271ea6756a1c5)
int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider* dpp)
{
uint64_t obj_size;
+ ceph::real_time mtime;
+
+ if (!params.lastmod) {
+ params.lastmod = &mtime;
+ }
parent_op.conds.mod_ptr = params.mod_ptr;
parent_op.conds.unmod_ptr = params.unmod_ptr;
source->set_instance(parent_op.state.obj.key.instance);
source->set_obj_size(obj_size);
+ source->set_mtime(*params.lastmod);
params.parts_count = parent_op.params.parts_count;
return ret;