Whamcloud - gitweb
LU-8066 obd: migrate to ksets
[fs/lustre-release.git] / lustre / include / obd.h
index 61aafdd..be2bec4 100644 (file)
@@ -33,7 +33,9 @@
 #ifndef __OBD_H
 #define __OBD_H
 
+#include <linux/kobject.h>
 #include <linux/spinlock.h>
+#include <linux/sysfs.h>
 
 #include <uapi/linux/lustre/lustre_idl.h>
 #include <lustre_lib.h>
@@ -105,7 +107,8 @@ struct obd_type {
        int                      typ_refcnt;
        struct lu_device_type   *typ_lu;
        spinlock_t               obd_type_lock;
-       struct kobject          *typ_kobj;
+       struct kobject           typ_kobj;
+       struct completion        typ_kobj_unregister;
 };
 
 struct brw_page {
@@ -694,7 +697,8 @@ struct obd_device {
        struct proc_dir_entry   *obd_proc_exports_entry;
        struct proc_dir_entry   *obd_svc_procroot;
        struct lprocfs_stats    *obd_svc_stats;
-       struct attribute_group  *obd_attrs;
+       struct attribute_group           obd_attrs_group;
+       struct attribute               **obd_attrs;
        struct lprocfs_vars     *obd_vars;
        atomic_t                obd_evict_inprogress;
        wait_queue_head_t       obd_evict_inprogress_waitq;
@@ -713,8 +717,9 @@ struct obd_device {
         * List of outstanding class_incref()'s fo this OBD. For debugging. */
        struct lu_ref                   obd_reference;
 
-       struct kobject          obd_kobj; /* sysfs object */
-       struct completion       obd_kobj_unregister;
+       struct kset                     obd_kset; /* sysfs object collection */
+       struct kobj_type                obd_ktype;
+       struct completion               obd_kobj_unregister;
 };
 
 /* get/set_info keys */