Whamcloud - gitweb
b=19387 integrate LST into acc-sm
[fs/lustre-release.git] / lustre / osd / osd_iam.h
index b7c53cb..2c71983 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/module.h>
 #include <asm/unaligned.h>
 #include <linux/dynlocks.h>
-
 /*
  *  linux/include/linux/osd_iam.h
  */
@@ -93,8 +92,6 @@ enum {
 };
 
 #ifdef __KERNEL__
-/* handle_t, journal_start(), journal_stop() */
-#include <linux/jbd.h>
 
 /*
  * Debugging.
@@ -450,15 +447,15 @@ struct iam_container {
          * Underlying flat file. IO against this object is issued to
          * read/write nodes.
          */
-        struct inode     *ic_object;
+        struct inode      *ic_object;
         /*
          * container flavor.
          */
-        struct iam_descr *ic_descr;
+        struct iam_descr  *ic_descr;
         /*
          * read-write lock protecting index consistency.
          */
-        struct rw_semaphore ic_sem;
+        cfs_rw_semaphore_t ic_sem;
 };
 
 /*
@@ -907,6 +904,7 @@ static inline struct iam_ikey *iam_path_ikey(const struct iam_path *path,
         return path->ip_data->ipd_key_scratch[nr];
 }
 
+
 static inline struct dynlock *path_dynlock(struct iam_path *path)
 {
         return &LDISKFS_I(iam_path_obj(path))->i_htree_lock;
@@ -981,10 +979,8 @@ int iam_read_leaf(struct iam_path *p);
 
 int iam_node_read(struct iam_container *c, iam_ptr_t ptr,
                   handle_t *handle, struct buffer_head **bh);
-int iam_lvar_create(struct inode *obj, int keysize, int ptrsize,
-                           int recsize, handle_t *handle);
-int iam_lfix_create(struct inode *obj, int keysize, int ptrsize,
-                           int recsize, handle_t *handle);
+int iam_lvar_create(struct inode *obj,
+                    int keysize, int ptrsize, int recsize, handle_t *handle);
 
 #ifndef swap
 #define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
@@ -1014,9 +1010,9 @@ static inline void iam_lock_bh(struct buffer_head volatile *bh)
 {
         DX_DEVAL(iam_lock_stats.dls_bh_lock++);
 #ifdef CONFIG_SMP
-        while (test_and_set_bit(BH_DXLock, &bh->b_state)) {
+        while (cfs_test_and_set_bit(BH_DXLock, &bh->b_state)) {
                 DX_DEVAL(iam_lock_stats.dls_bh_busy++);
-                while (test_bit(BH_DXLock, &bh->b_state))
+                while (cfs_test_bit(BH_DXLock, &bh->b_state))
                         cpu_relax();
         }
 #endif
@@ -1069,7 +1065,7 @@ struct iam_format {
         /*
          * Linkage into global list of container formats.
          */
-        struct list_head if_linkage;
+        cfs_list_t if_linkage;
 };
 
 void iam_format_register(struct iam_format *fmt);
@@ -1079,6 +1075,8 @@ void iam_lfix_format_init(void);
 void iam_lvar_format_init(void);
 void iam_htree_format_init(void);
 
+int iam_lfix_create(struct inode *obj,
+                    int keysize, int ptrsize, int recsize, handle_t *handle);
 struct iam_private_info;
 
 void ldiskfs_iam_release(struct file *filp, struct inode *inode);