Whamcloud - gitweb
fix paralel init for llog.
authorshadow <shadow>
Fri, 5 Sep 2008 11:06:51 +0000 (11:06 +0000)
committershadow <shadow>
Fri, 5 Sep 2008 11:06:51 +0000 (11:06 +0000)
make llog more smp safe.
don't write big array into journal.
fix return codes in llog_put_cat_list/llog_get_cat_list.

Branch b1_8_gate
b=16679
i=umka
i=adilger

lustre/obdclass/llog_ioctl.c

index d1c3fa5..48b9cc1 100644 (file)
@@ -432,12 +432,11 @@ int llog_catalog_list(struct obd_device *obd, int count,
         ENTRY;
         size = sizeof(*idarray) * count;
 
-        OBD_ALLOC(idarray, size);
+        OBD_VMALLOC(idarray, size);
         if (!idarray)
                 RETURN(-ENOMEM);
-        memset(idarray, 0, size);
 
-        rc = llog_get_cat_list(obd, obd, name, count, idarray);
+        rc = llog_get_cat_list(obd, obd, name, 0, count, idarray);
         if (rc) {
                 OBD_FREE(idarray, size);
                 RETURN(rc);
@@ -457,7 +456,7 @@ int llog_catalog_list(struct obd_device *obd, int count,
                         break;
                 }
         }
-        OBD_FREE(idarray, size);
+        OBD_VFREE(idarray, size);
         RETURN(0);
 
 }