/* reintegration functions */
static int cmobd_setattr_reint(struct obd_device *obd, void *rec)
{
- struct obdo *oa = (struct obdo*)rec;
+ int rc = 0;
+ struct lov_stripe_md *lsm;
struct cm_obd *cmobd = &obd->u.cm;
struct obd_export *exp = cmobd->master_exp;
- struct lov_stripe_md *lsm;
- struct lov_obd *lov;
- int rc;
+ struct obdo *oa = (struct obdo *)rec;
ENTRY;
- /*
- * nevertheless ost is not used anymore and lov should be always present
- * as a object storage export, using ost is still possible (just
- * deprecated) and we should make sure here, that this is really
- * lov. --umka.
- */
- lov = &cmobd->master_exp->exp_obd->u.lov;
- rc = cmobd_dummy_lsm(&lsm, lov->desc.ld_tgt_count, oa,
- (__u32)lov->desc.ld_default_stripe_size);
+ rc = cmobd_dummy_lsm(&lsm, cmobd->master_desc.ld_tgt_count, oa,
+ (__u32)cmobd->master_desc.ld_default_stripe_size);
if (rc)
GOTO(out, rc);
struct obd_export *exp = cmobd->master_exp;
struct lov_stripe_md *lsm;
struct obd_trans_info oti = { 0 };
- struct lov_obd *lov;
int rc;
ENTRY;
- /*
- * nevertheless ost is not used anymore and lov should be always present
- * as a object storage export, using ost is still possible (just
- * deprecated) and we should make sure here, that this is really
- * lov. --umka.
- */
- lov = &cmobd->master_exp->exp_obd->u.lov;
- rc = cmobd_dummy_lsm(&lsm, lov->desc.ld_tgt_count, oa,
- (__u32)lov->desc.ld_default_stripe_size);
+ rc = cmobd_dummy_lsm(&lsm, cmobd->master_desc.ld_tgt_count, oa,
+ (__u32)cmobd->master_desc.ld_default_stripe_size);
if (rc)
GOTO(out, rc);
if (cmobd->master_group != oa->o_gr) {
}
/* XXX layering violation! -phil */
- lock_res(lock->l_resource);
+ lock_res_and_lock(lock);
/* Get this: if filter_blocking_ast is racing with ldlm_intent_policy,
* such that filter_blocking_ast is called just before l_i_p takes the
* correct blocking function anymore. So check, and return early, if
* so. */
if (lock->l_blocking_ast != cache_blocking_ast) {
- unlock_res(lock->l_resource);
+ unlock_res_and_lock(lock);
RETURN(0);
}
lock->l_flags |= LDLM_FL_CBPENDING;
do_ast = (!lock->l_readers && !lock->l_writers);
- unlock_res(lock->l_resource);
+ unlock_res_and_lock(lock);
if (do_ast) {
struct lustre_handle lockh;
ldlm_policy_data_t policy;
struct lov_stripe_md *lsm;
int flags = 0, err, rc = 0;
- struct lov_obd *lov;
ENTRY;
/* XXX for debug write replay without smfs and kml */
if (rc != ELDLM_OK)
RETURN(rc);
- /*
- * nevertheless ost is not used anymore and lov should be always present
- * as a object storage export, using ost is still possible (just
- * deprecated) and we should make sure here, that this is really
- * lov. --umka.
- */
- lov = &cmobd->master_exp->exp_obd->u.lov;
-
/* construct the pseudo lsm */
/*
* layering violation. It should be accessed via some interface method,
* like llite does. --umka
*/
- rc = cmobd_dummy_lsm(&lsm, lov->desc.ld_tgt_count, oa,
- (__u32)lov->desc.ld_default_stripe_size);
+ rc = cmobd_dummy_lsm(&lsm, cmobd->master_desc.ld_tgt_count, oa,
+ (__u32)cmobd->master_desc.ld_default_stripe_size);
if (rc)
GOTO(out_lock, rc);