Whamcloud - gitweb
Prepare for Build 33
[fs/lustre-release.git] / lustre / obdclass / llog_ioctl.c
index 48b9cc1..ca1877e 100644 (file)
@@ -147,6 +147,7 @@ static int llog_check_cb(struct llog_handle *handle, struct llog_rec_hdr *rec,
                 case OST_RAID1_REC:
                 case MDS_UNLINK_REC:
                 case MDS_SETATTR_REC:
+                case MDS_SETATTR64_REC:
                 case OBD_CFG_REC:
                 case LLOG_HDR_MAGIC: {
                          l = snprintf(out, remains, "[index]: %05d  [type]: "
@@ -436,11 +437,10 @@ int llog_catalog_list(struct obd_device *obd, int count,
         if (!idarray)
                 RETURN(-ENOMEM);
 
-        rc = llog_get_cat_list(obd, obd, name, 0, count, idarray);
-        if (rc) {
-                OBD_FREE(idarray, size);
-                RETURN(rc);
-        }
+        mutex_down(&obd->obd_olg.olg_cat_processing);
+        rc = llog_get_cat_list(obd, name, 0, count, idarray);
+        if (rc)
+                GOTO(out, rc);
 
         out = data->ioc_bulk;
         remains = data->ioc_inllen1;
@@ -456,8 +456,12 @@ int llog_catalog_list(struct obd_device *obd, int count,
                         break;
                 }
         }
+out:
+        /* release semaphore */
+        mutex_up(&obd->obd_olg.olg_cat_processing);
+
         OBD_VFREE(idarray, size);
-        RETURN(0);
+        RETURN(rc);
 
 }
 EXPORT_SYMBOL(llog_catalog_list);