Whamcloud - gitweb
b=17631
[fs/lustre-release.git] / lustre / include / lustre_log.h
index d1b8e82..402e33e 100644 (file)
@@ -199,7 +199,7 @@ int llog_catalog_list(struct obd_device *obd, int count,
 /* llog_net.c */
 int llog_initiator_connect(struct llog_ctxt *ctxt);
 int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp);
-int llog_origin_connect(struct llog_ctxt *ctxt, int count,
+int llog_origin_connect(struct llog_ctxt *ctxt,
                         struct llog_logid *logid, struct llog_gen *gen,
                         struct obd_uuid *uuid);
 int llog_handle_connect(struct ptlrpc_request *req);
@@ -209,7 +209,7 @@ int llog_obd_repl_cancel(struct llog_ctxt *ctxt,
                          struct lov_stripe_md *lsm, int count,
                          struct llog_cookie *cookies, int flags);
 int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp);
-int llog_obd_repl_connect(struct llog_ctxt *ctxt, int count,
+int llog_obd_repl_connect(struct llog_ctxt *ctxt,
                           struct llog_logid *logid, struct llog_gen *gen,
                           struct obd_uuid *uuid);
 
@@ -238,7 +238,7 @@ struct llog_operations {
                        struct llog_cookie *logcookies, int numcookies);
         int (*lop_cancel)(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm,
                           int count, struct llog_cookie *cookies, int flags);
-        int (*lop_connect)(struct llog_ctxt *ctxt, int count,
+        int (*lop_connect)(struct llog_ctxt *ctxt,
                            struct llog_logid *logid, struct llog_gen *gen,
                            struct obd_uuid *uuid);
         /* XXX add 2 more: commit callbacks and llog recovery functions */
@@ -250,6 +250,9 @@ int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
                       char *name, int idx, int count,
                       struct llog_catid *idarray);
 
+int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
+                      char *name, int idx, int count, struct llog_catid *idarray);
+
 struct llog_ctxt {
         int                      loc_idx; /* my index the obd array of ctxt's */
         struct llog_gen          loc_gen;
@@ -279,17 +282,17 @@ struct llog_commit_master {
          */
         atomic_t                   lcm_count;
         /**
-         * Ptlrpc requests set. All cancel rpcs go via this request set.
-         */
-        struct ptlrpc_request_set *lcm_set;
-        /**
          * Thread control structure. Used for control commit thread.
          */
         struct ptlrpcd_ctl         lcm_pc;
         /**
-         * Busy resources waitq
+         * Lock protecting list of llcds.
          */
-        cfs_waitq_t                lcm_waitq;
+        spinlock_t                 lcm_lock;
+        /**
+         * Llcds in flight for debugging purposes.
+         */
+        struct list_head           lcm_llcds;
         /**
          * Commit thread name buffer. Only used for thread start.
          */
@@ -314,6 +317,10 @@ struct llog_canceld_ctxt {
          */
         int                        llcd_size;
         /**
+         * Link to lcm llcds list.
+         */
+        struct list_head           llcd_list;
+        /**
          * Current llcd size while gathering cookies. This should not be
          * more than ->llcd_size. Used for determining if we need to
          * send this llcd (if full) and allocate new one. This is also
@@ -410,6 +417,7 @@ static inline void llog_group_init(struct obd_llog_group *olg, int group)
 {
         cfs_waitq_init(&olg->olg_waitq);
         spin_lock_init(&olg->olg_lock);
+        sema_init(&olg->olg_cat_processing, 1);
         olg->olg_group = group;
 }
 
@@ -617,7 +625,7 @@ static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res,
         RETURN(rc);
 }
 
-static inline int llog_connect(struct llog_ctxt *ctxt, int count,
+static inline int llog_connect(struct llog_ctxt *ctxt,
                                struct llog_logid *logid, struct llog_gen *gen,
                                struct obd_uuid *uuid)
 {
@@ -631,7 +639,7 @@ static inline int llog_connect(struct llog_ctxt *ctxt, int count,
         if (lop->lop_connect == NULL)
                 RETURN(-EOPNOTSUPP);
 
-        rc = lop->lop_connect(ctxt, count, logid, gen, uuid);
+        rc = lop->lop_connect(ctxt, logid, gen, uuid);
         RETURN(rc);
 }