Whamcloud - gitweb
move md_ stuff from here and use md_object.h
authortappro <tappro>
Fri, 7 Apr 2006 14:23:53 +0000 (14:23 +0000)
committertappro <tappro>
Fri, 7 Apr 2006 14:23:53 +0000 (14:23 +0000)
lustre/mdt/mdt_internal.h

index a694a70..42eaed8 100644 (file)
  * struct ptlrpc_client
  */
 #include <linux/lustre_net.h>
+#include <linux/obd.h>
 /*
  * struct obd_connect_data
  * struct lustre_handle
  */
 #include <linux/lustre_idl.h>
 
-#include <linux/lu_object.h>
-
-struct md_device_operations;
+#include <linux/md_object.h>
 
 struct ptlrpc_service_conf {
         int psc_nbufs;
@@ -60,19 +59,6 @@ struct ptlrpc_service_conf {
         int psc_num_threads;
 };
 
-struct md_object;
-
-struct md_device {
-        struct lu_device             md_lu_dev;
-        struct md_device_operations *md_ops;
-};
-
-struct md_device_operations {
-        int (*mdo_root_get)(struct md_device *m, struct lu_fid *f);
-        int (*mdo_mkdir)(struct md_object *o, const char *name,
-                         struct md_object *child);
-};
-
 struct mdt_device {
         /* super-class */
         struct md_device           mdt_md_dev;
@@ -99,27 +85,6 @@ enum mdt_flags {
         MDT_CL_COMPAT_RESNAME = 1 << 0,
 };
 
-struct md_object {
-        struct lu_object mo_lu;
-};
-
-static inline int lu_device_is_md(struct lu_device *d)
-{
-        return d->ld_type->ldt_tags & LU_DEVICE_MD;
-}
-
-static inline struct md_object *lu2md(struct lu_object *o)
-{
-        LASSERT(lu_device_is_md(o->lo_dev));
-        return container_of(o, struct md_object, mo_lu);
-}
-
-static inline struct md_device *md_device_get(struct md_object *o)
-{
-        LASSERT(lu_device_is_md(o->mo_lu.lo_dev));
-        return container_of(o->mo_lu.lo_dev, struct md_device, md_lu_dev);
-}
-
 struct mdt_object {
         struct lu_object_header mot_header;
         struct md_object        mot_obj;