Whamcloud - gitweb
b=22614 enlarge MDSSIZE/OSTSIZE to increase default journal size for conf-sanity
authorFan Yong <Yong.Fan@sun.com>
Tue, 27 Apr 2010 02:51:27 +0000 (10:51 +0800)
committerRobert Read <robert.read@oracle.com>
Tue, 27 Apr 2010 17:28:58 +0000 (10:28 -0700)
1) enlarge MDSSIZE/OSTSIZE to increase default journal size for conf-sanity
2) journal handler error process in lustre_commit_dquot

i=robert.read
i=landen

lustre/lvfs/lustre_quota_fmt.c
lustre/tests/conf-sanity.sh

index 58cc7b7..d169bb7 100644 (file)
@@ -875,6 +875,7 @@ int lustre_commit_dquot(struct lustre_dquot *dquot)
         lustre_quota_version_t version = dquot->dq_info->qi_version;
         void *handle;
         struct inode *inode = dquot->dq_info->qi_files[dquot->dq_type]->f_dentry->d_inode;
         lustre_quota_version_t version = dquot->dq_info->qi_version;
         void *handle;
         struct inode *inode = dquot->dq_info->qi_files[dquot->dq_type]->f_dentry->d_inode;
+        int delete = 0;
 
         /* always clear the flag so we don't loop on an IO error... */
         cfs_clear_bit(DQ_MOD_B, &dquot->dq_flags);
 
         /* always clear the flag so we don't loop on an IO error... */
         cfs_clear_bit(DQ_MOD_B, &dquot->dq_flags);
@@ -882,15 +883,20 @@ int lustre_commit_dquot(struct lustre_dquot *dquot)
         /* The block/inode usage in admin quotafile isn't the real usage
          * over all cluster, so keep the fake dquot entry on disk is
          * meaningless, just remove it */
         /* The block/inode usage in admin quotafile isn't the real usage
          * over all cluster, so keep the fake dquot entry on disk is
          * meaningless, just remove it */
-        if (cfs_test_bit(DQ_FAKE_B, &dquot->dq_flags)) {
-                handle = lustre_quota_journal_start(inode, 1);
+        if (cfs_test_bit(DQ_FAKE_B, &dquot->dq_flags))
+                delete = 1;
+        handle = lustre_quota_journal_start(inode, delete);
+        if (unlikely(IS_ERR(handle))) {
+                rc = PTR_ERR(handle);
+                CERROR("fail to lustre_quota_journal_start: rc = %d\n", rc);
+                return rc;
+        }
+
+        if (delete)
                 rc = lustre_delete_dquot(dquot, version);
                 rc = lustre_delete_dquot(dquot, version);
-                lustre_quota_journal_stop(handle);
-        } else {
-                handle = lustre_quota_journal_start(inode, 0);
+        else
                 rc = lustre_write_dquot(dquot, version);
                 rc = lustre_write_dquot(dquot, version);
-                lustre_quota_journal_stop(handle);
-        }
+        lustre_quota_journal_stop(handle);
 
         if (rc < 0)
                 return rc;
 
         if (rc < 0)
                 return rc;
index fbe96bb..448aa09 100644 (file)
@@ -32,8 +32,9 @@ if [ -n "$MDSSIZE" ]; then
     STORED_MDSSIZE=$MDSSIZE
 fi
 # use small MDS + OST size to speed formatting time
     STORED_MDSSIZE=$MDSSIZE
 fi
 # use small MDS + OST size to speed formatting time
-MDSSIZE=40000
-OSTSIZE=40000
+# do not use too small MDSSIZE/OSTSIZE, which affect the default jouranl size
+MDSSIZE=200000
+OSTSIZE=200000
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 require_dsh_mds || exit 0
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 require_dsh_mds || exit 0