X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fmdd%2Fmdd_object.c;h=7a313c703c961842a27054f6c27c87075447936f;hb=558c93dc56dc603be0b4e065a5ffe8b448f33bd5;hp=beb99601bdf8d32263225670324c3eab279c12c4;hpb=aaa808e7a40198581956a1d648f413cc30e830ed;p=fs%2Flustre-release.git diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index beb9960..7a313c7 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -761,26 +761,26 @@ static int mdd_attr_set_changelog(const struct lu_env *env, struct md_object *obj, struct thandle *handle, __u64 valid) { - struct mdd_device *mdd = mdo2mdd(obj); - int bits, type = 0; + struct mdd_device *mdd = mdo2mdd(obj); + int bits, type = 0; bits = (valid & LA_SIZE) ? 1 << CL_TRUNC : 0; bits |= (valid & ~(LA_CTIME|LA_MTIME|LA_ATIME)) ? 1 << CL_SETATTR : 0; - bits |= (valid & LA_MTIME) ? 1 << CL_MTIME : 0; - bits |= (valid & LA_CTIME) ? 1 << CL_CTIME : 0; - bits |= (valid & LA_ATIME) ? 1 << CL_ATIME : 0; - bits = bits & mdd->mdd_cl.mc_mask; + bits |= (valid & LA_MTIME) ? 1 << CL_MTIME : 0; + bits |= (valid & LA_CTIME) ? 1 << CL_CTIME : 0; + bits |= (valid & LA_ATIME) ? 1 << CL_ATIME : 0; + bits = bits & mdd->mdd_cl.mc_mask; /* This is an implementation limit rather than a protocol limit */ CLASSERT(CL_LAST <= sizeof(int) * 8); - if (bits == 0) - return 0; + if (bits == 0) + return 0; - /* The record type is the lowest non-masked set bit */ + /* The record type is the lowest non-masked set bit */ type = __ffs(bits); - /* FYI we only store the first CLF_FLAGMASK bits of la_valid */ - return mdd_changelog_data_store(env, mdd, type, (int)valid, - md2mdd_obj(obj), handle); + /* FYI we only store the first CLF_FLAGMASK bits of la_valid */ + return mdd_changelog_data_store(env, mdd, type, (int)valid, + md2mdd_obj(obj), handle); } static int mdd_declare_attr_set(const struct lu_env *env,