Whamcloud - gitweb
Cleanup Compiler Warnings(Patch by Robert Read)
[fs/lustre-release.git] / lustre / include / obd.h
index 0db6e51..242d80d 100644 (file)
@@ -386,7 +386,7 @@ struct mdc_rpc_lock;
 struct obd_import;
 struct lustre_cache;
 struct client_obd {
-        struct semaphore         cl_sem;
+        struct rw_semaphore      cl_sem;
         struct obd_uuid          cl_target_uuid;
         struct obd_import       *cl_import; /* ptlrpc connection state */
         int                      cl_conn_count;
@@ -556,6 +556,7 @@ struct mds_obd {
 
         /* for capability keys update */
         struct lustre_capa_key          *mds_capa_keys;
+        struct rw_semaphore             mds_notify_lock;
 };
 
 /* lov objid */
@@ -861,6 +862,7 @@ struct obd_llog_group {
         cfs_waitq_t        olg_waitq;
         spinlock_t         olg_lock;
         struct obd_export *olg_exp;
+        int                olg_initializing;
 };
 
 /* corresponds to one of the obd's */
@@ -940,8 +942,9 @@ struct obd_device {
         spinlock_t                       obd_uncommitted_replies_lock;
         cfs_timer_t                      obd_recovery_timer;
         time_t                           obd_recovery_start; /* seconds */
-        time_t                           obd_recovery_end; /* seconds */
+        time_t                           obd_recovery_end; /* seconds, for lprocfs_status */
         time_t                           obd_recovery_max_time; /* seconds, bz13079 */
+        int                              obd_recovery_timeout;
         
         /* new recovery stuff from CMD2 */
         struct target_recovery_data      obd_recovery_data;
@@ -995,15 +998,8 @@ struct obd_device {
 enum obd_cleanup_stage {
 /* Special case hack for MDS LOVs */
         OBD_CLEANUP_EARLY,
-/* Precleanup stage 1, we must make sure all exports (other than the
-   self-export) get destroyed. */
+/* can be directly mapped to .ldto_device_fini() */
         OBD_CLEANUP_EXPORTS,
-/* Precleanup stage 2,  do other type-specific cleanup requiring the
-   self-export. */
-        OBD_CLEANUP_SELF_EXP,
-/* FIXME we should eliminate the "precleanup" function and make them stages
-   of the "cleanup" function. */
-        OBD_CLEANUP_OBD,
 };
 
 /* get/set_info keys */
@@ -1197,6 +1193,14 @@ struct obd_ops {
                                  struct obd_async_page_ops *ops, void *data,
                                  void **res, int nocache,
                                  struct lustre_handle *lockh);
+        int (*o_reget_short_lock)(struct obd_export *exp,
+                                  struct lov_stripe_md *lsm,
+                                  void **res, int rw,
+                                  obd_off start, obd_off end,
+                                  void **cookie);
+        int (*o_release_short_lock)(struct obd_export *exp,
+                                    struct lov_stripe_md *lsm, obd_off end,
+                                    void *cookie, int rw);
         int (*o_queue_async_io)(struct obd_export *exp,
                                 struct lov_stripe_md *lsm,
                                 struct lov_oinfo *loi, void *cookie,
@@ -1267,7 +1271,7 @@ struct obd_ops {
                              int cmd, obd_off *);
 
         /* llog related obd_methods */
-        int (*o_llog_init)(struct obd_device *obd, int group,
+        int (*o_llog_init)(struct obd_device *obd, struct obd_llog_group *grp,
                            struct obd_device *disk_obd, int count,
                            struct llog_catid *logid, struct obd_uuid *uuid);
         int (*o_llog_finish)(struct obd_device *obd, int count);
@@ -1500,11 +1504,14 @@ static inline void obd_transno_commit_cb(struct obd_device *obd, __u64 transno,
                        obd->obd_name, transno, error);
                 return;
         }
-        CDEBUG(D_HA, "%s: transno "LPU64" committed\n",
-               obd->obd_name, transno);
         if (transno > obd->obd_last_committed) {
+                CDEBUG(D_HA, "%s: transno "LPD64" committed\n",
+                       obd->obd_name, transno);
                 obd->obd_last_committed = transno;
                 ptlrpc_commit_replies (obd);
+        } else {
+                CDEBUG(D_INFO, "%s: transno "LPD64" committed\n",
+                       obd->obd_name, transno);
         }
 }