Whamcloud - gitweb
b=19975
[fs/lustre-release.git] / lustre / cmm / cmm_split.c
index 1d105fb..4487876 100644 (file)
@@ -241,17 +241,7 @@ struct cmm_object *cmm_object_find(const struct lu_env *env,
                                    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,
@@ -278,13 +268,8 @@ static int cmm_split_fid_alloc(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);
@@ -689,7 +674,7 @@ int cmm_split_dir(const struct lu_env *env, struct md_object *mo)
          * 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);