diff -urN linux-2.6.23-mm1-orig/fs/reiser4/super.h linux-2.6.23-mm1/fs/reiser4/super.h --- linux-2.6.23-mm1-orig/fs/reiser4/super.h 2007-12-29 19:53:04.837605194 +0300 +++ linux-2.6.23-mm1/fs/reiser4/super.h 2007-12-29 20:04:11.136691674 +0300 @@ -262,7 +262,7 @@ /* operations for objects on this file system */ struct object_ops ops; - + __u32 atom_max_nrpointers; /* * structure to maintain d_cursors. See plugin/file_ops_readdir.c for * more details diff -urN linux-2.6.23-mm1-orig/fs/reiser4/txnmgr.c linux-2.6.23-mm1/fs/reiser4/txnmgr.c --- linux-2.6.23-mm1-orig/fs/reiser4/txnmgr.c 2007-12-29 19:53:04.869613413 +0300 +++ linux-2.6.23-mm1/fs/reiser4/txnmgr.c 2007-12-29 22:02:40.671070164 +0300 @@ -1235,6 +1235,30 @@ atom->txnh_count == atom->nr_waiters && atom_should_commit(atom); } +static void check_print_atom_nrpointers (txn_atom * atom) +{ + reiser4_super_info_data *sbinfo = get_current_super_private(); + + spin_lock_reiser4_super(sbinfo); + if ((unsigned)atom_pointer_count(atom) > sbinfo->atom_max_nrpointers) { + sbinfo->atom_max_nrpointers = atom_pointer_count(atom); +#if REISER4_DEBUG + printk("edward-1555: atom %p has max_nr_pointers (%d), clean (%d), dirty (%d)\n", + atom, atom_pointer_count(atom), atom->clean, atom->dirty); +#else + printk("edward-1555: atom %p has max_nr_pointers (%d)\n", + atom, atom_pointer_count(atom)); +#endif + } + if (atom_is_committable(atom) && + (unsigned)atom_pointer_count(atom) == sbinfo->atom_max_nrpointers) { + printk("edward-1556: commit atom %p with max nrpointers %d\n", + atom, sbinfo->atom_max_nrpointers); + dump_stack(); + } + spin_unlock_reiser4_super(sbinfo); +} + /* called periodically from ktxnmgrd to commit old atoms. Releases ktxnmgrd spin * lock at exit */ int commit_some_atoms(txn_mgr * mgr) @@ -1264,6 +1288,7 @@ * first test without taking atom spin lock, whether it is * eligible for committing at all */ + check_print_atom_nrpointers(atom); if (atom_is_committable(atom)) { /* now, take spin lock and re-check */ spin_lock_atom(atom); @@ -1683,7 +1708,7 @@ flusher */ reiser4_atom_set_stage(cd->atom, ASTAGE_CAPTURE_WAIT); cd->atom->flags |= ATOM_FORCE_COMMIT; - + check_print_atom_nrpointers(cd->atom); result = commit_current_atom(&cd->nr_written, &cd->atom); if (result != 0 && result != -E_REPEAT)