LASSERTF(S_ISDIR(inode->i_mode), "Not slave inode "DFID"\n",
PFID(fid));
- LTIME_S(inode->i_mtime) = 0;
- LTIME_S(inode->i_atime) = 0;
- LTIME_S(inode->i_ctime) = 0;
+ inode->i_mtime.tv_sec = 0;
+ inode->i_atime.tv_sec = 0;
+ inode->i_ctime.tv_sec = 0;
inode->i_rdev = 0;
#ifdef HAVE_BACKING_DEV_INFO
}
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),
- (s64)ktime_get_real_seconds());
+ CDEBUG(D_INODE, "setting mtime %lld, ctime %lld, now = %lld\n",
+ (s64)attr->ia_mtime.tv_sec, (s64)attr->ia_ctime.tv_sec,
+ ktime_get_real_seconds());
if (S_ISREG(inode->i_mode)) {
if (attr->ia_valid & ATTR_SIZE)
inode->i_generation = cl_fid_build_gen(&body->mbo_fid1);
if (body->mbo_valid & OBD_MD_FLATIME) {
- if (body->mbo_atime > LTIME_S(inode->i_atime))
- LTIME_S(inode->i_atime) = body->mbo_atime;
+ if (body->mbo_atime > inode->i_atime.tv_sec)
+ inode->i_atime.tv_sec = body->mbo_atime;
lli->lli_atime = body->mbo_atime;
}
if (body->mbo_valid & OBD_MD_FLMTIME) {
- if (body->mbo_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->mbo_mtime);
- LTIME_S(inode->i_mtime) = body->mbo_mtime;
+ if (body->mbo_mtime > inode->i_mtime.tv_sec) {
+ CDEBUG(D_INODE,
+ "setting ino %lu mtime from %lld to %llu\n",
+ inode->i_ino, (s64)inode->i_mtime.tv_sec,
+ body->mbo_mtime);
+ inode->i_mtime.tv_sec = body->mbo_mtime;
}
lli->lli_mtime = body->mbo_mtime;
}
if (body->mbo_valid & OBD_MD_FLCTIME) {
- if (body->mbo_ctime > LTIME_S(inode->i_ctime))
- LTIME_S(inode->i_ctime) = body->mbo_ctime;
+ if (body->mbo_ctime > inode->i_ctime.tv_sec)
+ inode->i_ctime.tv_sec = body->mbo_ctime;
lli->lli_ctime = body->mbo_ctime;
}
/* Core attributes from the MDS first. This is a new inode, and
* the VFS doesn't zero times in the core inode so we have to do
* it ourselves. They will be overwritten by either MDS or OST
- * attributes - we just need to make sure they aren't newer. */
- LTIME_S(inode->i_mtime) = 0;
- LTIME_S(inode->i_atime) = 0;
- LTIME_S(inode->i_ctime) = 0;
- inode->i_rdev = 0;
+ * attributes - we just need to make sure they aren't newer.
+ */
+ inode->i_mtime.tv_sec = 0;
+ inode->i_atime.tv_sec = 0;
+ inode->i_ctime.tv_sec = 0;
+ inode->i_rdev = 0;
rc = ll_update_inode(inode, md);
if (rc != 0)
RETURN(rc);