Whamcloud - gitweb
LU-911 osd: OI is implemented internally within OSD
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_oi.h
index 77b293c..ce68721 100644 (file)
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -53,6 +55,7 @@
 
 /* struct rw_semaphore */
 #include <linux/rwsem.h>
+#include <lustre_fid.h>
 #include <lu_object.h>
 #include <md_object.h>
 
@@ -62,21 +65,8 @@ struct lu_site;
 struct thandle;
 
 struct dt_device;
-
-enum {
-        OSD_OI_FID_16,
-        OSD_OI_FID_NR
-};
-
-/*
- * Object Index (oi) instance.
- */
-struct osd_oi {
-        /*
-         * underlying index object, where fid->id mapping in stored.
-         */
-        struct dt_object *oi_dir;
-};
+struct osd_device;
+struct osd_oi;
 
 /*
  * Storage cookie. Datum uniquely identifying inode on the underlying file
@@ -91,19 +81,15 @@ struct osd_inode_id {
 };
 
 int osd_oi_mod_init(void);
-int osd_oi_init(struct osd_thread_info *info,
-                struct osd_oi *oi,
-                struct dt_device *dev,
-                struct md_device *mdev);
-void osd_oi_fini(struct osd_thread_info *info, struct osd_oi *oi);
-
-int  osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi,
+int osd_oi_init(struct osd_thread_info *info, struct osd_device *osd);
+void osd_oi_fini(struct osd_thread_info *info, struct osd_device *osd);
+int  osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd,
                    const struct lu_fid *fid, struct osd_inode_id *id);
-int  osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi,
+int  osd_oi_insert(struct osd_thread_info *info, struct osd_device *osd,
                    const struct lu_fid *fid, const struct osd_inode_id *id,
                    struct thandle *th, int ingore_quota);
 int  osd_oi_delete(struct osd_thread_info *info,
-                   struct osd_oi *oi, const struct lu_fid *fid,
+                   struct osd_device *osd, const struct lu_fid *fid,
                    struct thandle *th);
 
 #endif /* __KERNEL__ */