struct lu_object *orig = o;
const struct lu_fid *fid = lu_object_fid(o);
+ LASSERTF(atomic_read(&top->loh_ref) > 0, "o %p\n", o);
/*
* till we have full fids-on-OST implemented anonymous objects
* are possible in OSP. such an object isn't listed in the site
}
tgt_type_name = lustre_cfg_string(cfg, 2);
- if (!tgt_type_name) {
+ if (!tgt_type_name || strcmp(tgt_type_name, "mdd")) {
CERROR("%s no type name for echo %s setup\n",
lustre_cfg_string(cfg, 1),
tgt->obd_type->typ_name);
}
parent = child;
}
+
if (rc)
RETURN(ERR_PTR(rc));
+ if (!lu_object_exists(parent)) {
+ lu_object_put(env, parent);
+ parent = ERR_PTR(-ENOENT);
+ }
+
RETURN(parent);
}
}
run_test 135 "check the behavior when changelog is wrapped around"
+cleanup_136 () {
+ do_facet mds2 "$LCTL --device ec cleanup" || true
+ do_facet mds2 "$LCTL --device ec detach" || true
+
+ stopall
+ reformat_and_config
+}
+
+test_136() {
+ (( MDSCOUNT >= 2 )) || skip "needs >= 2 MDTs"
+
+ reformat
+ setup_noconfig
+
+ do_facet mds2 "$LCTL attach echo_client ec ec_uuid" ||
+ error "echo attach fail"
+
+ stack_trap cleanup_136 EXIT
+
+ do_facet mds2 "$LCTL --device ec setup lustre-MDT0001 mdt" &&
+ error "attach to MDT should fail!"
+
+ do_facet mds2 "$LCTL --device ec setup lustre-MDT0001 mdd" ||
+ error "attach to MDD should OK"
+ do_facet mds2 "$LCTL --device ec test_mkdir /tt" &&
+ error "mkdir test should fail with remote object"
+
+ return 0
+}
+run_test 136 "don't panic with bad obdecho setup"
+
test_140() {
(( MDS1_VERSION >= $(version_code 2.15.55) )) ||
skip "need MDS version at least 2.15.55"