+static int ofd_object_init(const struct lu_env *env, struct lu_object *o,
+ const struct lu_object_conf *conf)
+{
+ struct ofd_device *d = ofd_dev(o->lo_dev);
+ struct lu_device *under;
+ struct lu_object *below;
+ int rc = 0;
+
+ ENTRY;
+
+ CDEBUG(D_INFO, "object init, fid = "DFID"\n",
+ PFID(lu_object_fid(o)));
+
+ under = &d->ofd_osd->dd_lu_dev;
+ below = under->ld_ops->ldo_object_alloc(env, o->lo_header, under);
+ if (below != NULL)
+ lu_object_add(o, below);
+ else
+ rc = -ENOMEM;
+
+ RETURN(rc);
+}
+
+static void ofd_object_free(const struct lu_env *env, struct lu_object *o)
+{
+ struct ofd_object *of = ofd_obj(o);
+ struct lu_object_header *h;
+
+ ENTRY;
+
+ h = o->lo_header;
+ CDEBUG(D_INFO, "object free, fid = "DFID"\n",
+ PFID(lu_object_fid(o)));
+
+ lu_object_fini(o);
+ lu_object_header_fini(h);
+ OBD_SLAB_FREE_PTR(of, ofd_object_kmem);
+ EXIT;
+}
+
+static int ofd_object_print(const struct lu_env *env, void *cookie,
+ lu_printer_t p, const struct lu_object *o)
+{
+ return (*p)(env, cookie, LUSTRE_OST_NAME"-object@%p", o);
+}
+