-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define DEBUG_SUBSYSTEM S_LOG
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
#include <obd_class.h>
#include <lustre_log.h>
#include <libcfs/list.h>
RETURN(-EINVAL);
*end = '\0';
- logid->lgl_ogr = simple_strtoull(start, &endp, 0);
+ logid->lgl_oseq = simple_strtoull(start, &endp, 0);
if (endp != end)
RETURN(-EINVAL);
if (rc) {
CDEBUG(D_IOCTL,
"cannot find log #"LPX64"#"LPX64"#%08x\n",
- lir->lid_id.lgl_oid, lir->lid_id.lgl_ogr,
+ lir->lid_id.lgl_oid, lir->lid_id.lgl_oseq,
lir->lid_id.lgl_ogen);
RETURN(rc);
}
l = snprintf(out, remains,
"[index]: %05d [logid]: #"LPX64"#"LPX64"#%08x\n",
cur_index, lir->lid_id.lgl_oid,
- lir->lid_id.lgl_ogr, lir->lid_id.lgl_ogen);
+ lir->lid_id.lgl_oseq, lir->lid_id.lgl_ogen);
} else {
l = snprintf(out, remains,
"[index]: %05d [type]: %02x [len]: %04d\n",
rc = llog_cat_id2handle(cat, &log, logid);
if (rc) {
CDEBUG(D_IOCTL, "cannot find log #"LPX64"#"LPX64"#%08x\n",
- logid->lgl_oid, logid->lgl_ogr, logid->lgl_ogen);
+ logid->lgl_oid, logid->lgl_oseq, logid->lgl_ogen);
GOTO(out, rc = -ENOENT);
}
"flags: %x (%s)\n"
"records count: %d\n"
"last index: %d\n",
- handle->lgh_id.lgl_oid, handle->lgh_id.lgl_ogr,
+ handle->lgh_id.lgl_oid, handle->lgh_id.lgl_oseq,
handle->lgh_id.lgl_ogen,
handle->lgh_hdr->llh_flags,
handle->lgh_hdr->llh_flags &
ENTRY;
size = sizeof(*idarray) * count;
- OBD_VMALLOC(idarray, size);
+ OBD_ALLOC_LARGE(idarray, size);
if (!idarray)
RETURN(-ENOMEM);
- cfs_mutex_down(&obd->obd_olg.olg_cat_processing);
+ cfs_mutex_lock(&obd->obd_olg.olg_cat_processing);
rc = llog_get_cat_list(obd, name, 0, count, idarray);
if (rc)
GOTO(out, rc);
id = &idarray[i].lci_logid;
l = snprintf(out, remains,
"catalog log: #"LPX64"#"LPX64"#%08x\n",
- id->lgl_oid, id->lgl_ogr, id->lgl_ogen);
+ id->lgl_oid, id->lgl_oseq, id->lgl_ogen);
out += l;
remains -= l;
if (remains <= 0) {
}
out:
/* release semaphore */
- cfs_mutex_up(&obd->obd_olg.olg_cat_processing);
+ cfs_mutex_unlock(&obd->obd_olg.olg_cat_processing);
- OBD_VFREE(idarray, size);
+ OBD_FREE_LARGE(idarray, size);
RETURN(rc);
}