Whamcloud - gitweb
r=alex
authorbrian <brian>
Fri, 23 Sep 2005 22:45:21 +0000 (22:45 +0000)
committerbrian <brian>
Fri, 23 Sep 2005 22:45:21 +0000 (22:45 +0000)
Possible fix for file size mismatch between mds and osts.

lustre/mds/handler.c
lustre/mds/mds_lov.c

index 02b8d22..0292710 100644 (file)
@@ -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 */
index ddc5958..6517874 100644 (file)
@@ -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);