From 728cedeeba97341da0774e317975a8d3e90dc9f3 Mon Sep 17 00:00:00 2001 From: johann Date: Fri, 3 Apr 2009 23:42:35 +0000 Subject: [PATCH] Branch b1_8 b=18695 i=adilger i=shadow don't update i_size on MDS_CLOSE for directories. --- lustre/ChangeLog | 6 ++++++ lustre/mds/mds_open.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index a01dd5b..44302c3 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -971,6 +971,12 @@ Details : enable OBD_CONNECT_MDT flag when connecting from the MDS so that from a different NID, so we do not need to wait for the export to be evicted. +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. + ------------------------------------------------------------------------------- 2008-05-26 Sun Microsystems, Inc. diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index c945b4d..f7e98e8 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -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; -- 1.8.3.1