From b0e49f31931adb096bcce130964aa60d96512ed2 Mon Sep 17 00:00:00 2001
From: kalpak <kalpak>
Date: Wed, 21 Nov 2007 20:06:55 +0000
Subject: [PATCH] b=13128 i=adilger, rupesh

check MDS timestamp only after stat of file.
---
 lustre/utils/liblustreapi.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c
index 9696ea98b0..1fd81bb106 100644
--- a/lustre/utils/liblustreapi.c
+++ b/lustre/utils/liblustreapi.c
@@ -879,18 +879,6 @@ static int cb_find_init(char *path, DIR *parent, DIR *dir,
                         goto decided;
         }
 
-        /* Check the time on mds. */
-        if (!decision) {
-                int for_mds;
-
-                for_mds = lustre_fs ? (S_ISREG(st->st_mode) &&
-                                       param->lmd->lmd_lmm.lmm_stripe_count)
-                                    : 0;
-                decision = find_time_check(st, param, for_mds);
-                if (decision == -1)
-                        goto decided;
-        }
-
         /* See if we can check the file type from the dirent. */
         if (param->type && de != NULL && de->d_type != DT_UNKNOWN &&
             de->d_type <= DT_MAX) {
@@ -944,6 +932,18 @@ static int cb_find_init(char *path, DIR *parent, DIR *dir,
                 }
         }
 
+        /* Check the time on mds. */
+        if (!decision) {
+                int for_mds;
+
+                for_mds = lustre_fs ? (S_ISREG(st->st_mode) &&
+                                       param->lmd->lmd_lmm.lmm_stripe_count)
+                                    : 0;
+                decision = find_time_check(st, param, for_mds);
+                if (decision == -1)
+                        goto decided;
+        }
+
         if (param->type && !checked_type) {
                 if ((st->st_mode & S_IFMT) == param->type) {
                         if (param->exclude_type)
-- 
GitLab