loghandle->lgh_last_idx++;
index = loghandle->lgh_last_idx;
+ LASSERT(index < LLOG_BITMAP_SIZE(llh));
rec->lrh_index = cpu_to_le32(index);
if (buf == NULL) {
lrt = (void *)rec + le32_to_cpu(rec->lrh_len) - sizeof(*lrt);
OBD_ALLOC(oa, sizeof(*oa));
if (!oa)
RETURN(ERR_PTR(-ENOMEM));
-
+
oa->o_gr = FILTER_GROUP_LLOG;
oa->o_valid = OBD_MD_FLGENER | OBD_MD_FLGROUP;
rc = obd_create(ctxt->loc_exp, oa, NULL, NULL);
lock_kernel();
rc = vfs_link(dentry, ctxt->loc_objects_dir->d_inode, new_child);
unlock_kernel();
- if (rc)
- CERROR("error link new object "LPX64":%u: rc %d\n",
+ if (rc) {
+ CERROR("error link new object "LPX64":%08x: rc %d\n",
logid.lgl_oid, logid.lgl_ogen, rc);
+ /* it doesn't make much sense to get -EEXIST here */
+ LASSERTF(rc != -EEXIST, "bug 3490: dentry: %p "
+ "dir->d_ionode %p new_child: %p \n",
+ dentry, ctxt->loc_objects_dir->d_inode, new_child);
+ }
err = llog_fsfilt_commit(ctxt, ctxt->loc_objects_dir->d_inode, handle, 0);
out_dput:
l_dput(new_child);
/* reads the catalog list */
int llog_get_cat_list(struct lvfs_run_ctxt *ctxt,
- struct fsfilt_operations *fsops, char *name,
+ struct fsfilt_operations *fsops, const char *name,
int count, struct llog_catid *idarray)
{
struct lvfs_run_ctxt saved;
/* writes the cat list */
int llog_put_cat_list(struct lvfs_run_ctxt *ctxt,
- struct fsfilt_operations *fsops, char *name,
+ struct fsfilt_operations *fsops, const char *name,
int count, struct llog_catid *idarray)
{
struct lvfs_run_ctxt saved;
}
int llog_get_cat_list(struct lvfs_run_ctxt *ctxt,
- struct fsfilt_operations *fsops, char *name,
+ struct fsfilt_operations *fsops, const char *name,
int count, struct llog_catid *idarray)
{
LBUG();
}
int llog_put_cat_list(struct lvfs_run_ctxt *ctxt,
- struct fsfilt_operations *fsops, char *name,
+ struct fsfilt_operations *fsops, const char *name,
int count, struct llog_catid *idarray)
{
LBUG();