X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_object.c;h=e93d2a032cb933539bce5a159dc33fbc141d2aba;hp=aa9a5cd2149beeba0b85abf05a4442ad4a119746;hb=d3542819362758d7a4d21e489f53d750aedece4c;hpb=3ec611d61138de3901944e4fdb50d8872fd472d5 diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index aa9a5cd..e93d2a0 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -1250,7 +1250,7 @@ static int mdd_changelog_data_store(const struct lu_env *env, LASSERT(handle != NULL); LASSERT(mdd_obj != NULL); - if ((type == CL_SETATTR) && + if ((type == CL_TIME) && cfs_time_before_64(mdd->mdd_cl.mc_starttime, mdd_obj->mod_cltime)) { /* Don't need multiple updates in this log */ /* Don't check under lock - no big deal if we get an extra @@ -1481,9 +1481,12 @@ static int mdd_attr_set(const struct lu_env *env, struct md_object *obj, } cleanup: - if ((rc == 0) && (ma->ma_attr.la_valid & (LA_MTIME | LA_CTIME))) - rc = mdd_changelog_data_store(env, mdd, CL_SETATTR, mdd_obj, - handle); + if (rc == 0) + rc = mdd_changelog_data_store(env, mdd, + (ma->ma_attr.la_valid & + ~(LA_MTIME|LA_CTIME|LA_ATIME)) ? + CL_SETATTR : CL_TIME, + mdd_obj, handle); mdd_trans_stop(env, mdd, rc, handle); if (rc == 0 && (lmm != NULL && lmm_size > 0 )) { /*set obd attr, if needed*/