Whamcloud - gitweb
send activate event only when connect finished and import state is FULL.
[fs/lustre-release.git] / lustre / obdclass / llog.c
index aec0202..31d6ba7 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -100,17 +100,17 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index)
         int rc = 0;
         ENTRY;
 
-        CDEBUG(D_RPCTRACE, "canceling %d in log "LPX64"\n",
+        CDEBUG(D_RPCTRACE, "Canceling %d in log "LPX64"\n",
                index, loghandle->lgh_id.lgl_oid);
 
         if (index == 0) {
-                CERROR("cannot cancel index 0 (which is header)\n");
+                CERROR("Can't cancel index 0 which is header\n");
                 RETURN(-EINVAL);
         }
 
         if (!ext2_clear_bit(index, llh->llh_bitmap)) {
-                CDEBUG(D_RPCTRACE, "catalog index %u already clear?\n", index);
-                RETURN(-EINVAL);
+                CDEBUG(D_RPCTRACE, "Catalog index %u already clear?\n", index);
+                RETURN(-ENOENT);
         }
 
         llh->llh_count--;
@@ -120,7 +120,7 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index)
             (loghandle->lgh_last_idx == (LLOG_BITMAP_BYTES * 8) - 1)) {
                 rc = llog_destroy(loghandle);
                 if (rc) {
-                        CERROR("failure destroying log after last cancel: %d\n",
+                        CERROR("Failure destroying log after last cancel: %d\n",
                                rc);
                         ext2_set_bit(index, llh->llh_bitmap);
                         llh->llh_count++;
@@ -132,7 +132,7 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index)
 
         rc = llog_write_rec(loghandle, &llh->llh_hdr, NULL, 0, NULL, 0);
         if (rc) {
-                CERROR("failure re-writing header %d\n", rc);
+                CERROR("Failure re-writing header %d\n", rc);
                 ext2_set_bit(index, llh->llh_bitmap);
                 llh->llh_count++;
         }
@@ -323,10 +323,6 @@ static int llog_process_thread(void *arg)
                                                  lpi->lpi_cbdata);
                                 last_called_index = index;
                                 if (rc == LLOG_PROC_BREAK) {
-                                        CDEBUG(D_HA, "recovery from log: "LPX64
-                                               ":%x stopped\n",
-                                               loghandle->lgh_id.lgl_oid,
-                                               loghandle->lgh_id.lgl_ogen);
                                         GOTO(out, rc);
                                 } else if (rc == LLOG_DEL_RECORD) {
                                         llog_cancel_rec(loghandle,
@@ -462,10 +458,6 @@ int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
                         if (ext2_test_bit(index, llh->llh_bitmap)) {
                                 rc = cb(loghandle, rec, data);
                                 if (rc == LLOG_PROC_BREAK) {
-                                        CWARN("recovery from log: "LPX64":%x"
-                                              " stopped\n",
-                                              loghandle->lgh_id.lgl_oid,
-                                              loghandle->lgh_id.lgl_ogen);
                                         GOTO(out, rc);
                                 }
                                 if (rc)