diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 9e11a86f3cc6c7ee572714d4f8325b80027b9a4c..5b6a32dbaf1db6298a171c439feee31736edafe5 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -214,6 +214,12 @@ Description: when mds and osts use different quota unit(32bit and 64bit),
              quota will be released repeatly.
 Details    : void sending multiple quota reqs to mds, which will keep the status 
              between the reqs.
+
+Severity   : normal 
+Bugzilla   : 13125
+Description: osts not allocated evenly to files
+Details    : change the condition to increase offset_idx 
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c
index 866d2602d61476461a253be17f2f702501dd5dca..c6ff1ebd460c19c17935d8ed9e5e6e72e8b8e1dc 100644
--- a/lustre/lov/lov_qos.c
+++ b/lustre/lov/lov_qos.c
@@ -532,7 +532,9 @@ static int alloc_rr(struct lov_obd *lov, int *idx_arr, int *stripe_cnt,
                 /* If we have allocated from all of the OSTs, slowly
                    precess the next start */
                 lov->lov_start_idx %= ost_count;
-                ++lov->lov_offset_idx;
+                if (stripe_cnt_min > 1 &&
+                    (ost_active_count % stripe_cnt_min) != 1)
+                        ++lov->lov_offset_idx;
         }
         down_read(&lov->lov_qos.lq_rw_sem);
         ost_start_idx_temp = lov->lov_start_idx;