+
+ entry = leaf->il_entries;
+ count = lentry_count_get(leaf);
-+ printk("lfix: %p %p %d\n", leaf, leaf->il_at, count);
++ printk(KERN_EMERG "lfix: %p %p %d\n", leaf, leaf->il_at, count);
+ for (i = 0; i < count; ++i, entry = iam_lfix_shift(leaf, entry, 1))
+ l_print(leaf, entry);
+}
===================================================================
--- iam.orig/fs/ext3/iam_lvar.c
+++ iam/fs/ext3/iam_lvar.c
-@@ -0,0 +1,1011 @@
+@@ -0,0 +1,1024 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+{
+ struct lvar_leaf_entry *scan;
+
-+ printk("used: %d\n", h_used(n_head(l)));
++ printk(KERN_EMERG "used: %d\n", h_used(n_head(l)));
+ for (scan = n_start(l); scan < n_end(l); scan = e_next(l, scan))
+ e_print(scan);
+}
+ l->il_at = lvar_lentry(e_next(l, n_cur(l)));
+}
+
++atomic_t lvar_enoent_debug = ATOMIC_INIT(0);
++EXPORT_SYMBOL(lvar_enoent_debug);
++
+static int lvar_lookup(struct iam_leaf *leaf, const struct iam_key *k)
+{
+ struct lvar_leaf_entry *found;
+ if (last)
+ result |= IAM_LOOKUP_LAST;
+ assert_inv(n_invariant(leaf));
++
++ if (unlikely(atomic_read(&lvar_enoent_debug))) {
++ struct iam_path *path;
++
++ path = leaf->il_path;
++ printk(KERN_EMERG "lvar noent: `%s'/%#x/%#x\n", name, hash,
++ *(lvar_hash_t *)iam_ikey_at(path, path->ip_frame->at));
++ n_print(leaf);
++ }
++
+ return result;
+}
+
RETURN(rc);
}
+extern atomic_t lvar_enoent_debug;
static int mdd_unlink(const struct lu_env *env, struct md_object *pobj,
struct md_object *cobj, const char *name,
struct md_attr *ma)
* Check -ENOENT early here because we need to get object type
* to calculate credits before transaction start
*/
- if (!lu_object_exists(&cobj->mo_lu))
+ if (!lu_object_exists(&cobj->mo_lu)) {
+ LU_OBJECT_DEBUG(D_ERROR, env, &cobj->mo_lu,
+ "unlinking as `%s'", name);
RETURN(-ENOENT);
+ }
+
LASSERTF(lu_object_exists(&cobj->mo_lu) > 0, "FID is "DFID"\n",
PFID(lu_object_fid(&cobj->mo_lu)));
GOTO(cleanup, rc);
is_dir = S_ISDIR(lu_object_attr(&cobj->mo_lu));
+ /*
+ * This should be per-thread debugging flag, but
+ */
+ atomic_inc(&lvar_enoent_debug);
rc = __mdd_index_delete(env, mdd_pobj, name, is_dir, handle,
mdd_object_capa(env, mdd_pobj));
+ atomic_dec(&lvar_enoent_debug);
if (rc)
GOTO(cleanup, rc);