From aa7c70a7d6f0720e82afce267415e740b23f00ec Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Wed, 19 Aug 2015 15:52:56 -0700 Subject: [PATCH 1/1] LU-5977 ofd: Removed correction for bad timestamps Removed a correction made to handle a bug with negative timestamps in Lustre 2.1.0. Signed-off-by: Giuseppe Di Natale Change-Id: I8bddd4370ac907a794b4b1c41062de482bee42f4 Reviewed-on: http://review.whamcloud.com/16077 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Bob Glossman Tested-by: Maloo --- lustre/include/dt_object.h | 2 -- lustre/ofd/ofd_objects.c | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 8fc9c66..ced5a8e 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -2640,8 +2640,6 @@ static inline int dt_lookup(const struct lu_env *env, return ret; } -#define LU221_BAD_TIME (0x80000000U + 24 * 3600) - struct dt_find_hint { struct lu_fid *dfh_fid; struct dt_device *dfh_dt; diff --git a/lustre/ofd/ofd_objects.c b/lustre/ofd/ofd_objects.c index 888186c..32f7694 100644 --- a/lustre/ofd/ofd_objects.c +++ b/lustre/ofd/ofd_objects.c @@ -784,21 +784,6 @@ int ofd_attr_get(const struct lu_env *env, struct ofd_object *fo, if (ofd_object_exists(fo)) { rc = dt_attr_get(env, ofd_object_child(fo), la); - -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) - /* Try to correct for a bug in 2.1.0 (LU-221) that caused - * negative timestamps to appear to be in the far future, - * due old timestamp being stored on disk as an unsigned value. - * This fixes up any bad values stored on disk before - * returning them to the client, and ensures any timestamp - * updates are correct. LU-1042 */ - if (unlikely(la->la_atime == LU221_BAD_TIME)) - la->la_atime = 0; - if (unlikely(la->la_mtime == LU221_BAD_TIME)) - la->la_mtime = 0; - if (unlikely(la->la_ctime == LU221_BAD_TIME)) - la->la_ctime = 0; -#endif } else { rc = -ENOENT; } -- 1.8.3.1