Whamcloud - gitweb
LU-2154 osp: precreate logic to use last assigned id
[fs/lustre-release.git] / lustre / osp / osp_internal.h
index 7a82bca..e75c246 100644 (file)
@@ -42,6 +42,7 @@
 #define _OSP_INTERNAL_H
 
 #include <obd.h>
+#include <obd_class.h>
 #include <dt_object.h>
 #include <lustre_fid.h>
 
@@ -102,8 +103,8 @@ struct osp_device {
         * Precreation pool
         */
        cfs_spinlock_t                   opd_pre_lock;
-       /* next id to assign in creation */
-       __u64                            opd_pre_next;
+       /* last id assigned in creation */
+       __u64                            opd_pre_used_id;
        /* last created id OST reported, next-created - available id's */
        __u64                            opd_pre_last_created;
        /* how many ids are reserved in declare, we shouldn't block in create */
@@ -182,6 +183,7 @@ struct osp_object {
 };
 
 extern struct lu_object_operations osp_lu_obj_ops;
+extern const struct dt_device_operations osp_dt_ops;
 
 struct osp_thread_info {
        struct lu_buf            osi_lb;
@@ -314,4 +316,10 @@ int osp_sync_init(const struct lu_env *env, struct osp_device *d);
 int osp_sync_fini(struct osp_device *d);
 void __osp_sync_check_for_work(struct osp_device *d);
 
+/* osp_ost.c */
+int osp_init_for_ost(const struct lu_env *env, struct osp_device *m,
+                    struct lu_device_type *ldt, struct lustre_cfg *cfg);
+int osp_disconnect(struct osp_device *d);
+int osp_fini_for_ost(struct osp_device *osp);
+
 #endif