@@ -1201,23 +1201,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
/* We mark all of the fields "set" so MDS/OST does not re-set them */
if (attr->ia_valid & ATTR_CTIME) {
- attr->ia_ctime = CURRENT_TIME;
+ attr->ia_ctime = current_time(inode);
attr->ia_valid |= ATTR_CTIME_SET;
}
if (!(attr->ia_valid & ATTR_ATIME_SET) &&
(attr->ia_valid & ATTR_ATIME)) {
- attr->ia_atime = CURRENT_TIME;
+ attr->ia_atime = current_time(inode);
attr->ia_valid |= ATTR_ATIME_SET;
}
if (!(attr->ia_valid & ATTR_MTIME_SET) &&
(attr->ia_valid & ATTR_MTIME)) {
- attr->ia_mtime = CURRENT_TIME;
+ attr->ia_mtime = current_time(inode);
attr->ia_valid |= ATTR_MTIME_SET;
}
if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME))
- CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n",
- LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime),
+ CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n",
+ (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime),
(s64)ktime_get_real_seconds());
/* We always do an MDS RPC, even if we're only changing the size;
@@ -1503,9 +1503,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
}
if (body->valid & OBD_MD_FLMTIME) {
if (body->mtime > LTIME_S(inode->i_mtime)) {
- CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n",
- inode->i_ino, LTIME_S(inode->i_mtime),
- body->mtime);
+ CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n",
+ inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime),
+ (unsigned long long)body->mtime);
LTIME_S(inode->i_mtime) = body->mtime;
}
lli->lli_mtime = body->mtime;
@@ -725,8 +725,8 @@ static void ll_update_times(struct ptlrpc_request *request,
LASSERT(body);
if (body->valid & OBD_MD_FLMTIME &&
body->mtime > LTIME_S(inode->i_mtime)) {
- CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n",
- PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime),
+ CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n",
+ PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime),
body->mtime);
LTIME_S(inode->i_mtime) = body->mtime;
}
@@ -139,9 +139,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
rpc_lock = obd->u.cli.cl_rpc_lock;
if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME))
- CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n",
- LTIME_S(op_data->op_attr.ia_mtime),
- LTIME_S(op_data->op_attr.ia_ctime));
+ CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n",
+ (long long)LTIME_S(op_data->op_attr.ia_mtime),
+ (long long)LTIME_S(op_data->op_attr.ia_ctime));
mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len);
ptlrpc_request_set_replen(req);
@@ -50,9 +50,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid)
if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
CDEBUG(D_INODE,
- "valid %#llx, cur time %lu/%lu, new %llu/%llu\n",
- src->o_valid, LTIME_S(dst->i_mtime),
- LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime);
+ "valid %#llx, cur time %llu/%llu, new %llu/%llu\n",
+ src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime),
+ (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime);
if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime))
LTIME_S(dst->i_atime) = src->o_atime;
@@ -58,9 +58,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid)
u32 newvalid = 0;
if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
- CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
- valid, LTIME_S(src->i_mtime),
- LTIME_S(src->i_ctime));
+ CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n",
+ valid, (unsigned long long)LTIME_S(src->i_mtime),
+ (unsigned long long)LTIME_S(src->i_ctime));
if (valid & OBD_MD_FLATIME) {
dst->o_atime = LTIME_S(src->i_atime);
@@ -217,7 +217,7 @@ static void osc_page_touch_at(const struct lu_env *env,
kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms,
loi->loi_lvb.lvb_size);
- attr->cat_ctime = LTIME_S(CURRENT_TIME);
+ attr->cat_ctime = ktime_get_real_seconds();
attr->cat_mtime = attr->cat_ctime;
valid = CAT_MTIME | CAT_CTIME;
if (kms > loi->loi_kms) {