Whamcloud - gitweb
- the filter doesn't have a cli_obd, so pass an import instead of a
authorpschwan <pschwan>
Thu, 3 Jul 2003 05:16:48 +0000 (05:16 +0000)
committerpschwan <pschwan>
Thu, 3 Jul 2003 05:16:48 +0000 (05:16 +0000)
  conn in the llcd
- avoid double obd_transno_commit_cb()
- initialize the fo_sem for great justice

lustre/include/linux/lustre_commit_confd.h
lustre/obdclass/recov_log.c
lustre/ptlrpc/recov_thread.c

index 0ec850e..5a021a8 100644 (file)
@@ -28,7 +28,7 @@
 
 struct llog_commit_data {
         struct list_head           llcd_list;  /* free or pending struct list */
-        struct lustre_handle       llcd_conn;  /* which osc is cancel target */
+        struct obd_import         *llcd_import;
         struct llog_commit_master *llcd_lcm;
         int                        llcd_tries; /* number of tries to send */
         int                        llcd_cookiebytes;
index 198b7a0..7c6a3f5 100644 (file)
@@ -216,16 +216,12 @@ static struct llog_handle *llog_current_log(struct llog_handle *cathandle,
         if (loghandle) {
                 struct llog_object_hdr *llh = loghandle->lgh_hdr;
                 if (llh->llh_count < sizeof(llh->llh_bitmap) * 8)
-                        GOTO(out, loghandle);
+                        RETURN(loghandle);
         }
 
-        if (reclen) {
+        if (reclen)
                 loghandle = llog_new_log(cathandle, cathandle->lgh_tgtuuid);
-                GOTO(out, loghandle);
-        }
-        GOTO(out, loghandle);
-out:
-        return loghandle;
+        RETURN(loghandle);
 }
 
 /* Add a single record to the recovery log(s).
index 942c455..1048629 100644 (file)
@@ -140,7 +140,7 @@ static int log_commit_thread(void *arg)
         CDEBUG(D_HA, "%s started\n", current->comm);
         do {
                 struct ptlrpc_request *request;
-                struct lustre_handle conn;
+                struct obd_import *import;
                 struct list_head *sending_list;
                 int rc = 0;
 
@@ -198,11 +198,11 @@ static int log_commit_thread(void *arg)
                         llcd = list_entry(lcd->lcd_llcd_list.next,
                                           typeof(*llcd), llcd_list);
                         LASSERT(llcd->llcd_lcm == lcm);
-                        conn = llcd->llcd_conn;
+                        import = llcd->llcd_import;
                 }
                 list_for_each_entry_safe(llcd, n, sending_list, llcd_list) {
                         LASSERT(llcd->llcd_lcm == lcm);
-                        if (memcmp(&conn, &llcd->llcd_conn, sizeof(conn)) == 0)
+                        if (import == llcd->llcd_import)
                                 list_move_tail(&llcd->llcd_list,
                                                &lcd->lcd_llcd_list);
                 }
@@ -210,8 +210,7 @@ static int log_commit_thread(void *arg)
                         list_for_each_entry_safe(llcd, n, &lcm->lcm_llcd_resend,
                                                  llcd_list) {
                                 LASSERT(llcd->llcd_lcm == lcm);
-                                if (memcmp(&conn, &llcd->llcd_conn,
-                                           sizeof(conn)) == 0)
+                                if (import == llcd->llcd_import)
                                         list_move_tail(&llcd->llcd_list,
                                                        &lcd->lcd_llcd_list);
                         }
@@ -223,8 +222,7 @@ static int log_commit_thread(void *arg)
                         char *bufs[1] = {(char *)llcd->llcd_cookies};
                         list_del(&llcd->llcd_list);
 
-                        request = ptlrpc_prep_req(class_conn2cliimp(&conn),
-                                                  OBD_LOG_CANCEL, 1,
+                        request = ptlrpc_prep_req(import, OBD_LOG_CANCEL, 1,
                                                   &llcd->llcd_cookiebytes,
                                                   bufs);
                         if (request == NULL) {