Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdclass / llog_cat.c
index a757e68..8e39f4b 100644 (file)
@@ -67,7 +67,7 @@ static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle)
                 RETURN(ERR_PTR(-ENOSPC));
         }
 
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_LLOG_CREATE_FAILED))
+        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_LLOG_CREATE_FAILED))
                 RETURN(ERR_PTR(-ENOSPC));
  
         rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL);
@@ -91,7 +91,7 @@ static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle)
         llh->llh_count++;
         llh->llh_tail.lrt_index = index;
 
-        CDEBUG(D_HA, "new recovery log "LPX64":%x for index %u of catalog "
+        CDEBUG(D_RPCTRACE,"new recovery log "LPX64":%x for index %u of catalog "
                LPX64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen,
                index, cathandle->lgh_id.lgl_oid);
         /* build the record for this log in the catalog */
@@ -325,8 +325,8 @@ int llog_cat_cancel_records(struct llog_handle *cathandle, int count,
                         llog_cat_set_first_idx(cathandle, index);
                         rc = llog_cancel_rec(cathandle, index);
                         if (rc == 0)
-                                CDEBUG(D_HA, "cancel plain log at index %u "
-                                       "of catalog "LPX64"\n",
+                                CDEBUG(D_RPCTRACE,"cancel plain log at index %u"
+                                       " of catalog "LPX64"\n",
                                        index, cathandle->lgh_id.lgl_oid);
                 }
         }
@@ -486,7 +486,7 @@ int llog_cat_set_first_idx(struct llog_handle *cathandle, int index)
                         }
                 }
 out:
-                CDEBUG(D_HA, "set catlog "LPX64" first idx %u\n",
+                CDEBUG(D_RPCTRACE, "set catlog "LPX64" first idx %u\n",
                        cathandle->lgh_id.lgl_oid, llh->llh_cat_idx);
         }
 
@@ -507,7 +507,7 @@ int llog_cat_init(struct llog_handle *cathandle, struct obd_uuid *tgtuuid)
         down(&cathandle->lgh_lock);
         llh = cathandle->lgh_hdr;
 
-        if (cathandle->lgh_file->f_dentry->d_inode->i_size == 0) {
+        if (i_size_read(cathandle->lgh_file->f_dentry->d_inode) == 0) {
                 llog_write_rec(cathandle, &llh->llh_hdr, NULL, 0, NULL, 0);
 
 write_hdr: