RETURN(rc);
exp = lmv->tgts[mds_num].ltd_exp;
- LASSERT(exp);
+ LASSERTF(exp, "No export for MDS #%i\n", mds_num);
req = ptlrpc_prep_req(class_exp2cliimp(exp),
LUSTRE_MDS_VERSION, MDS_PARSE_ID, 1,
CERROR("log is not plain\n");
RETURN(-EINVAL);
}
-
+
if (rec->lrh_type != SMFS_AUDIT_NAME_REC)
RETURN(0);
-
+
ad_rec = (struct audit_record *)(rec + 1);
-
- if (ad_rec->result ||
- ad_rec->opcode != AUDIT_UNLINK ||
- ad_rec->opcode != AUDIT_RENAME)
+ if (ad_rec->result ||
+ (ad_rec->opcode != AUDIT_UNLINK &&
+ ad_rec->opcode != AUDIT_RENAME))
RETURN(0);
cid_rec = (struct audit_id_record *)(ad_rec + 1);
pid_rec = cid_rec + 1;
nm_rec = (struct audit_name_record *)(pid_rec + 1);
-
+
if (cid_rec->au_num == id_ino(&pkg->pp_id1) &&
cid_rec->au_gen == id_gen(&pkg->pp_id1)) {
LASSERT(pid_rec->au_fid);
/* get name */
memcpy(pkg->pp_name, nm_rec->name,
le32_to_cpu(nm_rec->name_len));
-
RETURN(LLOG_PROC_BREAK);
}
RETURN(0);
if (rc != LLOG_PROC_BREAK) {
CWARN("process catalog log failed: rc(%d)\n", rc);
rc = -ENOENT;
+ } else {
+ rc = 0;
}
out:
pkg->pp_rc = rc;
RETURN(rc);
exp = lmv->tgts[mds_num].ltd_exp;
- LASSERT(exp);
+ LASSERTF(exp, "No export for MDS #%i\n", mds_num);
req = ptlrpc_prep_req(class_exp2cliimp(exp),
LUSTRE_MDS_VERSION, MDS_PARSE_ID, 1,
INIT_LIST_HEAD(&list);
cur_id = *id;
- if (!id_fid(&cur_id)) {
+ if (!id_ino(&cur_id)) {
CERROR("Invalid id!\n");
RETURN(-EINVAL);
}
rc = mds_id2name(obd, &cur_id, &list, &parent_id);
if (rc == -ENOENT) {
/* can't reconstruct name from id, turn to audit log */
- LASSERT(id_fid(&parent_id));
cur_id = parent_id;
memset(&parent_id, 0, sizeof(parent_id));
}
list_del_init(&item->link);
OBD_FREE(item, sizeof(*item));
- LASSERT(strlen(*name) < *namelen);
+ if (*name)
+ LASSERT(strlen(*name) < *namelen);
}
RETURN(rc);
}