continue;
/* Drop slow OSCs if we can */
- if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp, speed == 0) >
- speed)
+ if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed)
continue;
*idx_pos = ost_idx;
continue;
/* Drop slow OSCs if we can */
- if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp, speed == 0) >
- speed)
+ if ((obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed) &&
+ (i != 0 || speed < 2))
continue;
*idx_pos = ost_idx;
GOTO(out_up_write, rc = -EAGAIN);
rc = qos_calc_ppo(exp->exp_obd);
- if (rc)
+ if (rc)
GOTO(out_up_write, rc);
-
+
total_bavail = 0;
good_osts = 0;
/* Warn users about zero available space/inode every 30 min */
/* Find all the OSTs that are valid stripe candidates */
for (i = 0; i < ost_count; i++) {
__u64 bavail;
-
+
if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
continue;
bavail = TGT_BAVAIL(i);
if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && i == 0)
continue;
- if (obd_precreate(lov->lov_tgts[i]->ltd_exp, 1) > 2)
+ if (obd_precreate(lov->lov_tgts[i]->ltd_exp) > 2)
continue;
lov->lov_tgts[i]->ltd_qos.ltq_usable = 1;
good_osts++;
}
+ if (good_osts < stripe_cnt_min)
+ GOTO(out_up_write, rc = -EAGAIN);
+
if (!total_bavail)
GOTO(out_up_write, rc = -ENOSPC);
- if (good_osts < stripe_cnt_min)
- GOTO(out_up_write, rc = -EAGAIN);
-
/* We have enough osts */
if (good_osts < *stripe_cnt)
*stripe_cnt = good_osts;