struct cmm_device *d,
const struct lu_fid *f)
{
- struct lu_object *o;
- struct cmm_object *m;
- ENTRY;
-
- o = lu_object_find(env, d->cmm_md_dev.md_lu_dev.ld_site, f);
- if (IS_ERR(o))
- m = (struct cmm_object *)o;
- else
- m = lu2cmm_obj(lu_object_locate(o->lo_header,
- d->cmm_md_dev.md_lu_dev.ld_type));
- RETURN(m);
+ return md2cmm_obj(md_object_find_slice(env, &d->cmm_md_dev, fid));
}
static inline void cmm_object_put(const struct lu_env *env,
/* Alloc new fid on @mc. */
rc = obd_fid_alloc(mc->mc_desc.cl_exp, fid, NULL);
- if (rc > 0) {
- /* Setup FLD for new sequenceif needed. */
- rc = fld_client_create(cmm->cmm_fld, fid_seq(fid),
- mc->mc_num, env);
- if (rc)
- CERROR("Can't create fld entry, rc %d\n", rc);
- }
+ if (rc > 0)
+ rc = 0;
up(&mc->mc_fid_sem);
RETURN(rc);
* Disable transacrions for split, since there will be so many trans in
* this one ops, conflict with current recovery design.
*/
- rc = cmm_upcall(env, &cmm->cmm_md_dev, MD_NO_TRANS);
+ rc = cmm_upcall(env, &cmm->cmm_md_dev, MD_NO_TRANS, NULL);
if (rc) {
CERROR("Can't disable trans for split, rc %d\n", rc);
GOTO(out, rc);