Whamcloud - gitweb
LU-5577 obd: change brw_page->count to unsigned
[fs/lustre-release.git] / lustre / include / obd.h
index 5d1dde4..ec69de4 100644 (file)
@@ -37,6 +37,7 @@
 #ifndef __OBD_H
 #define __OBD_H
 
+#include <linux/spinlock.h>
 #include <linux/obd.h>
 
 #include <lustre/lustre_idl.h>
@@ -191,7 +192,7 @@ struct obd_type {
 struct brw_page {
        obd_off  off;
        struct page *pg;
-       int count;
+       unsigned int count;
        obd_flag flag;
 };
 
@@ -273,14 +274,10 @@ struct client_obd {
          * blocking everywhere, but we don't want to slow down fast-path of
          * our main platform.)
          *
-         * Exact type of ->cl_loi_list_lock is defined in arch/obd.h together
-         * with client_obd_list_{un,}lock() and
-         * client_obd_list_lock_{init,done}() functions.
-        *
         * NB by Jinshan: though field names are still _loi_, but actually
         * osc_object{}s are in the list.
         */
-       client_obd_lock_t       cl_loi_list_lock;
+       spinlock_t              cl_loi_list_lock;
        struct list_head        cl_loi_ready_list;
        struct list_head        cl_loi_hp_ready_list;
        struct list_head        cl_loi_write_list;
@@ -307,7 +304,7 @@ struct client_obd {
        atomic_long_t            cl_lru_in_list;
        atomic_long_t            cl_unstable_count;
        struct list_head         cl_lru_list; /* lru page list */
-       client_obd_lock_t        cl_lru_list_lock; /* page list protector */
+       spinlock_t               cl_lru_list_lock; /* page list protector */
        atomic_t                 cl_lru_shrinkers;
 
        /* number of in flight destroy rpcs is limited to max_rpcs_in_flight */
@@ -442,7 +439,7 @@ struct lmv_obd {
        struct obd_export       *exp;
        struct proc_dir_entry   *targets_proc_entry;
 
-       struct mutex            init_mutex;
+       struct mutex            lmv_init_mutex;
        int                     connected;
        int                     max_easize;
        int                     max_def_easize;
@@ -932,13 +929,10 @@ struct obd_ops {
                         struct lov_stripe_md *mem_src);
         int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt,
                           struct lov_mds_md *disk_src, int disk_len);
-        int (*o_create)(const struct lu_env *env, struct obd_export *exp,
-                        struct obdo *oa, struct lov_stripe_md **ea,
-                        struct obd_trans_info *oti);
-        int (*o_destroy)(const struct lu_env *env, struct obd_export *exp,
-                         struct obdo *oa, struct lov_stripe_md *ea,
-                         struct obd_trans_info *oti, struct obd_export *md_exp,
-                         void *capa);
+       int (*o_create)(const struct lu_env *env, struct obd_export *exp,
+                       struct obdo *oa, struct obd_trans_info *oti);
+       int (*o_destroy)(const struct lu_env *env, struct obd_export *exp,
+                        struct obdo *oa, struct obd_trans_info *oti);
         int (*o_setattr)(const struct lu_env *, struct obd_export *exp,
                          struct obd_info *oinfo, struct obd_trans_info *oti);
         int (*o_setattr_async)(struct obd_export *exp, struct obd_info *oinfo,
@@ -1171,8 +1165,6 @@ struct md_ops {
 
 struct lsm_operations {
         void (*lsm_free)(struct lov_stripe_md *);
-        int (*lsm_destroy)(struct lov_stripe_md *, struct obdo *oa,
-                           struct obd_export *md_exp);
         void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, obd_off *,
                                     obd_off *);
         void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *,