Whamcloud - gitweb
b=23094 add layout lock connect flag
[fs/lustre-release.git] / lustre / osd / osd_oi.h
index 3c474cb..77b293c 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -54,6 +54,7 @@
 /* struct rw_semaphore */
 #include <linux/rwsem.h>
 #include <lu_object.h>
+#include <md_object.h>
 
 struct lu_fid;
 struct osd_thread_info;
@@ -63,8 +64,7 @@ struct thandle;
 struct dt_device;
 
 enum {
-        OSD_OI_FID_SMALL,
-        OSD_OI_FID_OTHER,
+        OSD_OI_FID_16,
         OSD_OI_FID_NR
 };
 
@@ -75,7 +75,7 @@ struct osd_oi {
         /*
          * underlying index object, where fid->id mapping in stored.
          */
-        struct dt_object *oi_dir[OSD_OI_FID_NR];
+        struct dt_object *oi_dir;
 };
 
 /*
@@ -90,15 +90,18 @@ struct osd_inode_id {
         __u32 oii_gen; /* inode generation */
 };
 
-int  osd_oi_init(struct osd_thread_info *info,
-                 struct osd_oi *oi, struct dt_device *dev);
+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,
                    const struct lu_fid *fid, struct osd_inode_id *id);
 int  osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi,
                    const struct lu_fid *fid, const struct osd_inode_id *id,
-                   struct thandle *th);
+                   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 thandle *th);