* RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
removed cwd "./" (refer to Bugzilla 14399).
+Severity : minor
+Frequency : rare on shutdown ost
+Bugzilla : 13196
+Description: Don't allow skipping OSTs if index has been specified.
+Details : Don't allow skipping OSTs if index has been specified, make locking
+ in internal create lots better.
+
Severity : normal
Bugzilla : 12228
Description: LBUG in ptlrpc_check_set() bad phase ebc0de00
struct lov_stripe_md *mem_tgt);
int (*o_preallocate)(struct lustre_handle *, obd_count *req,
obd_id *ids);
- int (*o_precreate)(struct obd_export *exp, int need_create);
+ int (*o_precreate)(struct obd_export *exp);
int (*o_create)(struct obd_export *exp, struct obdo *oa,
struct lov_stripe_md **ea, struct obd_trans_info *oti);
int (*o_destroy)(struct obd_export *exp, struct obdo *oa,
RETURN(rc);
}
-static inline int obd_precreate(struct obd_export *exp, int need_create)
+static inline int obd_precreate(struct obd_export *exp)
{
int rc;
ENTRY;
EXP_CHECK_OP(exp, precreate);
OBD_COUNTER_INCREMENT(exp->exp_obd, precreate);
- rc = OBP(exp->exp_obd, precreate)(exp, need_create);
+ rc = OBP(exp->exp_obd, precreate)(exp);
RETURN(rc);
}
/* If we have allocated from all of the OSTs, slowly
precess the next start */
lov->lov_start_idx %= ost_count;
- if (*stripe_cnt > 1 && (ost_active_count % (*stripe_cnt) != 1))
+ if (*stripe_cnt > 1 && (ost_active_count % (*stripe_cnt)) != 1)
++lov->lov_offset_idx;
}
down_read(&lov->lov_qos.lq_rw_sem);
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;
if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0)
continue;
- /* Drop slow OSCs if we can */
- if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp, speed == 0) >
- speed)
+ /* Drop slow OSCs if we can, but not for requested start idx */
+ if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed &&
+ (i != 0 || speed < 2))
continue;
*idx_pos = ost_idx;
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;
int size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
ENTRY;
- spin_lock(&oscc->oscc_lock);
+ LASSERT_SPIN_LOCKED(&oscc->oscc_lock);
+
if (oscc->oscc_grow_count < OST_MAX_PRECREATE &&
!(oscc->oscc_flags & (OSCC_FLAG_LOW | OSCC_FLAG_RECOVERING)) &&
(__s64)(oscc->oscc_last_id - oscc->oscc_next_id) <=
int have_objs;
spin_lock(&oscc->oscc_lock);
have_objs = ((__s64)(oscc->oscc_last_id - oscc->oscc_next_id) >= count);
- spin_unlock(&oscc->oscc_lock);
- if (!have_objs)
+ if (!have_objs) {
oscc_internal_create(oscc);
+ } else {
+ spin_unlock(&oscc->oscc_lock);
+ }
return have_objs;
}
a potentially very long time
1000 : unusable
*/
-int osc_precreate(struct obd_export *exp, int need_create)
+int osc_precreate(struct obd_export *exp)
{
struct osc_creator *oscc = &exp->exp_obd->u.cli.cl_oscc;
struct obd_import *imp = exp->exp_imp_reverse;
spin_unlock(&oscc->oscc_lock);
RETURN(2);
}
- spin_unlock(&oscc->oscc_lock);
-
- if (oscc->oscc_flags & OSCC_FLAG_CREATING)
- RETURN(1);
- if (!need_create)
+ if (oscc->oscc_flags & OSCC_FLAG_CREATING) {
+ spin_unlock(&oscc->oscc_lock);
RETURN(1);
+ }
oscc_internal_create(oscc);
RETURN(1);
#define OSCC_FLAG_LOW 0x10
#define OSCC_FLAG_EXITING 0x20
-int osc_precreate(struct obd_export *exp, int need_create);
+int osc_precreate(struct obd_export *exp);
int osc_create(struct obd_export *exp, struct obdo *oa,
struct lov_stripe_md **ea, struct obd_trans_info *oti);
int osc_real_create(struct obd_export *exp, struct obdo *oa,