Whamcloud - gitweb
b=23766 atime isn't properly updated on the MDS
authorAndrew Perepechko <andrew.perepechko@oracle.com>
Mon, 15 Nov 2010 12:21:11 +0000 (15:21 +0300)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Mon, 15 Nov 2010 12:21:11 +0000 (15:21 +0300)
Based on the patch from Robin Humble (ANU)

i=Andreas Dilger
i=Vitaly Fertman

lustre/mds/mds_open.c

index e1fd5e6..2f845f4 100644 (file)
@@ -1575,10 +1575,8 @@ int mds_mfd_close(struct ptlrpc_request *req, int offset,
                  * is more out-of-date than the specified limit.  If we are
                  * already going to write out the atime then do it anyway. */
                 if ((request_body->valid & OBD_MD_FLATIME) &&
-                    ((LTIME_S(iattr.ia_atime) >
-                      LTIME_S(inode->i_atime) + mds->mds_atime_diff) ||
-                     (iattr.ia_valid != 0 &&
-                      LTIME_S(iattr.ia_atime) > LTIME_S(inode->i_atime)))) {
+                    ((request_body->atime > LTIME_S(inode->i_atime) +
+                      mds->mds_atime_diff) )) {
                         LTIME_S(iattr.ia_atime) = request_body->atime;
                         iattr.ia_valid |= ATTR_ATIME;
                 }