From: brian Date: Fri, 23 Sep 2005 22:45:21 +0000 (+0000) Subject: r=alex X-Git-Tag: v1_7_100~609 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=78c709a3abeb7831d3485c41fcfc2c6a11df395a r=alex Possible fix for file size mismatch between mds and osts. --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 02b8d22..0292710 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1456,6 +1456,7 @@ int mds_getattr_size(struct obd_device *obd, struct dentry *dentry, struct ptlrpc_request *req, struct mds_body *body) { struct inode *inode = dentry->d_inode; + struct mds_obd *mds = &obd->u.mds; ENTRY; LASSERT(body != NULL); @@ -1473,6 +1474,9 @@ int mds_getattr_size(struct obd_device *obd, struct dentry *dentry, RETURN(0); } + if (mds->mds_config_generation) + return 0; + if (atomic_read(&inode->i_writecount)) { /* some one has opened the file for write. * mds doesn't know actual size */ diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index ddc5958..6517874 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -851,6 +851,7 @@ int mds_dt_update_config(struct obd_device *obd, int clean) sprintf(name, "%s-%d", profile, version); } CWARN("Applying configuration log %s\n", name); + mds->mds_config_generation++; push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); ctxt = llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);