From: Liang Zhen Date: Mon, 4 Apr 2011 16:31:20 +0000 (+0800) Subject: LU-191 mdd_close always set atime even it's same X-Git-Tag: 2.0.60.0~32 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d65f789f433f2d52e82116c374d88906321f9d28 LU-191 mdd_close always set atime even it's same mdd_close always set atime even new atime is exactly same as old one, this will impact performance of those shortly open/close applications and tests because of unnecessary transaction. Change-Id: Ib408dd238fca2e8a736aff1874e243f0d26894b0 Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/396 Tested-by: Hudson Reviewed-by: Mikhail Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index b0e3911..581b876 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -1035,9 +1035,9 @@ 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 && - la->la_atime <= (tmp_la->la_atime + - mdd_obj2mdd_dev(obj)->mdd_atime_diff)) + if (la->la_atime >= tmp_la->la_atime && + la->la_atime < (tmp_la->la_atime + + mdd_obj2mdd_dev(obj)->mdd_atime_diff)) la->la_valid &= ~LA_ATIME; RETURN(0); }