Whamcloud - gitweb
Branch b_release_1_8_0
authorjohann <johann>
Fri, 3 Apr 2009 23:31:30 +0000 (23:31 +0000)
committerjohann <johann>
Fri, 3 Apr 2009 23:31:30 +0000 (23:31 +0000)
b=18695
i=adilger
i=shadow

don't update i_size on MDS_CLOSE for directories.

lustre/ChangeLog
lustre/mds/mds_open.c

index 28fae72..91c09d5 100644 (file)
@@ -867,6 +867,11 @@ Description: Assertion failure in ldlm_lock_put
 Details    : Do not put cancelled locks into replay list, hold references on
              locks in replay list
 
+Severity   : critical
+Bugzilla   : 18695
+Descriptoin: Lustre detected file system corruption with inode out of bounds
+Details    : don't update i_size on MDS_CLOSE for directories. This causes
+            directory corruptions on the MDT.
 
 -------------------------------------------------------------------------------
 
index a732e57..b60b25b 100644 (file)
@@ -1537,7 +1537,8 @@ int mds_mfd_close(struct ptlrpc_request *req, int offset,
                  * rough decision making and will get the proper size later.
                  * * This is NOT guaranteed to be correct with multiple *
                  * writers, but is only needed until SOM is done. b=11063 */
-                if ((request_body->valid & OBD_MD_FLSIZE) &&
+                if (S_ISREG(inode->i_mode) &&
+                    (request_body->valid & OBD_MD_FLSIZE) &&
                     (iattr.ia_valid != 0)) {
                         iattr.ia_size = request_body->size;
                         iattr.ia_valid |= ATTR_SIZE;