X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog_ioctl.c;h=ca1877e3257a511ddcefd9a2f67fa8e2dd06dc71;hb=c5e8e49281ac04feca9ddbc13dc87acb5b20e57d;hp=23da5760c3f56d8e4d7bfa8c29af1ee1865b9ce8;hpb=70e80ade90af09300396706b8910e196a7928520;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c index 23da576..ca1877e 100644 --- a/lustre/obdclass/llog_ioctl.c +++ b/lustre/obdclass/llog_ioctl.c @@ -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 @@ -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]: " @@ -432,16 +433,14 @@ 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); - 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; @@ -457,8 +456,12 @@ int llog_catalog_list(struct obd_device *obd, int count, break; } } - OBD_FREE(idarray, size); - RETURN(0); +out: + /* release semaphore */ + mutex_up(&obd->obd_olg.olg_cat_processing); + + OBD_VFREE(idarray, size); + RETURN(rc); } EXPORT_SYMBOL(llog_catalog_list);