Whamcloud - gitweb
Obsolete CURRENT_SECONDS and use cfs_time_current_sec() instead.
[fs/lustre-release.git] / lustre / mdd / mdd_object.c
index 9240034..38a1ceb 100644 (file)
@@ -600,7 +600,8 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj,
 
         if (la->la_valid == LA_ATIME) {
                 /* This is atime only set for read atime update on close. */
-                if (la->la_atime <= tmp_la->la_atime + 0/*XXX:mds_atime_diff*/)
+                if (la->la_atime <= tmp_la->la_atime +
+                                    mdd_obj2mdd_dev(obj)->mdd_atime_diff)
                         la->la_valid &= ~LA_ATIME;
                 RETURN(0);
         }
@@ -901,7 +902,7 @@ static int mdd_xattr_set(const struct lu_env *env, struct md_object *obj,
         rc = mdd_xattr_set_txn(env, md2mdd_obj(obj), buf, name,
                                fl, handle);
         if (rc == 0) {
-                la_copy->la_ctime = CURRENT_SECONDS;
+                la_copy->la_ctime = cfs_time_current_sec();
                 la_copy->la_valid = LA_CTIME;
                 rc = mdd_attr_set_internal_locked(env, mdd_obj, la_copy,
                                                   handle, 0);
@@ -935,7 +936,7 @@ int mdd_xattr_del(const struct lu_env *env, struct md_object *obj,
                            mdd_object_capa(env, mdd_obj));
         mdd_write_unlock(env, mdd_obj);
         if (rc == 0) {
-                la_copy->la_ctime = CURRENT_SECONDS;
+                la_copy->la_ctime = cfs_time_current_sec();
                 la_copy->la_valid = LA_CTIME;
                 rc = mdd_attr_set_internal_locked(env, mdd_obj, la_copy,
                                                   handle, 0);
@@ -1314,7 +1315,7 @@ static int mdd_readpage_sanity_check(const struct lu_env *env,
 
 static int mdd_dir_page_build(const struct lu_env *env, int first,
                               void *area, int nob, struct dt_it_ops *iops,
-                              struct dt_it *it, __u32 *start, __u32 *end,
+                              struct dt_it *it, __u64 *start, __u64 *end,
                               struct lu_dirent **last)
 {
         struct lu_fid          *fid  = &mdd_env_info(env)->mti_fid2;
@@ -1337,7 +1338,7 @@ static int mdd_dir_page_build(const struct lu_env *env, int first,
                 char  *name;
                 int    len;
                 int    recsize;
-                __u32  hash;
+                __u64  hash;
 
                 name = (char *)iops->key(env, it);
                 len  = iops->key_size(env, it);
@@ -1351,7 +1352,7 @@ static int mdd_dir_page_build(const struct lu_env *env, int first,
                 hash = iops->store(env, it);
                 *end = hash;
 
-                CDEBUG(D_INFO, "%p %p %d "DFID": %#8.8x (%d) \"%*.*s\"\n",
+                CDEBUG(D_INFO, "%p %p %d "DFID": "LPU64" (%d) \"%*.*s\"\n",
                        name, ent, nob, PFID(fid), hash, len, len, len, name);
 
                 if (nob >= recsize) {
@@ -1393,8 +1394,8 @@ static int __mdd_readpage(const struct lu_env *env, struct mdd_object *obj,
         int i;
         int rc;
         int nob;
-        __u32 hash_start;
-        __u32 hash_end;
+        __u64 hash_start;
+        __u64 hash_end;
 
         LASSERT(rdpg->rp_pages != NULL);
         LASSERT(next->do_index_ops != NULL);