int rc, index;
ENTRY;
- if (le32_to_cpu(rec->lrh_type) != LLOG_LOGID_MAGIC) {
+ if (rec->lrh_type != LLOG_LOGID_MAGIC) {
CERROR("invalid record in catalog\n");
RETURN(-EINVAL);
}
CWARN("processing log "LPX64":%x at index %u of catalog "LPX64"\n",
lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen,
- le32_to_cpu(rec->lrh_index), cathandle->lgh_id.lgl_oid);
+ rec->lrh_index, cathandle->lgh_id.lgl_oid);
rc = llog_cat_id2handle(cathandle, &loghandle, &lir->lid_id);
if (rc) {
}
llh = loghandle->lgh_hdr;
- if ((le32_to_cpu(llh->llh_flags) & LLOG_F_ZAP_WHEN_EMPTY) &&
- (le32_to_cpu(llh->llh_count) == 1)) {
+ if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) &&
+ (llh->llh_count == 1)) {
rc = llog_destroy(loghandle);
if (rc)
CERROR("failure destroying log in postsetup: %d\n", rc);
if (rc == 0)
CWARN("cancel log "LPX64":%x at index %u of catalog "
LPX64"\n", lir->lid_id.lgl_oid,
- lir->lid_id.lgl_ogen, le32_to_cpu(rec->lrh_index),
+ lir->lid_id.lgl_ogen, rec->lrh_index,
cathandle->lgh_id.lgl_oid);
}
&cathandle->u.chd.chd_head,
u.phd.phd_entry) {
llh = loghandle->lgh_hdr;
- if ((le32_to_cpu(llh->llh_flags) &
+ if ((llh->llh_flags &
LLOG_F_ZAP_WHEN_EMPTY) &&
- (le32_to_cpu(llh->llh_count) == 1)) {
+ (llh->llh_count == 1)) {
rc = llog_destroy(loghandle);
if (rc)
CERROR("failure destroying log during "
int llog_cat_initialize(struct obd_device *obd, int count)
{
- struct llog_logid *idarray;
+ struct llog_catid *idarray;
int size = sizeof(*idarray) * count;
- char name[32] = "CATLIST";
+ char name[32] = CATLIST;
int rc;
ENTRY;
if (!idarray)
RETURN(-ENOMEM);
- memset(idarray, 0, size);
-
rc = llog_get_cat_list(obd, obd, name, count, idarray);
if (rc) {
CERROR("rc: %d\n", rc);
EXPORT_SYMBOL(llog_cat_initialize);
int obd_llog_init(struct obd_device *obd, struct obd_device *disk_obd,
- int count, struct llog_logid *logid)
+ int count, struct llog_catid *logid)
{
int rc;
ENTRY;