From bb7680852a5d37e25346ad3c059691eb75cd76bb Mon Sep 17 00:00:00 2001 From: braam Date: Sat, 1 Feb 2003 21:58:03 +0000 Subject: [PATCH] - temporary debugging stuff - this will slow you down. --- lustre/extN/extN-iget-debug.diff | 48 ++++++++++++++++++++++++++++++++++++++++ lustre/tests/busy.sh | 7 ++++++ 2 files changed, 55 insertions(+) create mode 100644 lustre/extN/extN-iget-debug.diff create mode 100644 lustre/tests/busy.sh diff --git a/lustre/extN/extN-iget-debug.diff b/lustre/extN/extN-iget-debug.diff new file mode 100644 index 0000000..7b552f5 --- /dev/null +++ b/lustre/extN/extN-iget-debug.diff @@ -0,0 +1,48 @@ +--- fs/ext3/namei.c.orig Thu Jan 30 01:15:13 2003 ++++ fs/ext3/namei.c Sat Feb 1 00:33:46 2003 +@@ -710,6 +710,24 @@ + return ret; + } + ++static int extN_find_inode(struct inode *inode, unsigned long ino, ++ void *opaque) ++{ ++ const char *name = NULL; ++ int len = 0; ++ ++ if (opaque) { ++ struct dentry *dentry = opaque; ++ name = dentry->d_name.name; ++ len = dentry->d_name.len; ++ } ++ printk(KERN_INFO "finding inode %s:%lu (%p) count %d (%p = %*s)\n", ++ kdevname(inode->i_dev), ino, inode, atomic_read(&inode->i_count), ++ opaque, len, name ? name : ""); ++ ++ return 1; ++} ++ + static struct dentry *extN_lookup(struct inode * dir, struct dentry *dentry) + { + struct inode * inode; +@@ -724,7 +742,7 @@ + if (bh) { + unsigned long ino = le32_to_cpu(de->inode); + brelse (bh); +- inode = iget(dir->i_sb, ino); ++ inode = iget4(dir->i_sb, ino, extN_find_inode, dentry); + + if (!inode) + return ERR_PTR(-EACCES); +--- fs/ext3/inode.c.orig Thu Jan 30 01:15:13 2003 ++++ fs/ext3/inode.c Sat Feb 1 00:34:45 2003 +@@ -166,6 +166,9 @@ + */ + void extN_put_inode (struct inode * inode) + { ++ printk(KERN_INFO "putting inode %s:%lu (%p) count %d\n", ++ kdevname(inode->i_dev), inode->i_ino, inode, ++ atomic_read(&inode->i_count)); + extN_discard_prealloc (inode); + } + diff --git a/lustre/tests/busy.sh b/lustre/tests/busy.sh new file mode 100644 index 0000000..2f90986 --- /dev/null +++ b/lustre/tests/busy.sh @@ -0,0 +1,7 @@ +#!/bin/bash + + mkdir /mnt/lustre/d22 + mkdir /mnt/lustre/d22/etc + ./mcreate /mnt/lustre/d22/etc/foo + ls -ld /mnt/lustre/etc + ls -ld /mnt/lustre/d22/etc -- 1.8.3.1