Messages in this thread Patch in this message | | | Date | Thu, 14 Aug 1997 08:54:46 -0400 | From | Bill Hawes <> | Subject | Re: 2.1.49 oops. |
| |
Edward Welbon wrote:
> Well, it looks much better, but I can't unmount /initrd or /dev/ram. > Mount shows no evidence of /initrd but /proc/mounts does:
There does seem to be a "busy inode" problem in 2.1.49. I've added a diagnostic check to invalidate_list to show the offending inodes, along with their names (if any).
On my system at shutdown there is usually an unnamed, low-numbered inode with count=1. The RedHat shutdown scripts check for failure of umount and do a r/o remount, so it doesn't cause an fsck problem. But if this is keeping your initrd from being released, then it would be a problem on your system.
Anyway, we need to track down where the busy inodes are coming from. The attached patch may help show what's going on -- you'll need to add a #define INODE_PARANOIA to fs/inode.c to enable it. Then when you try a umount dev it will show which inodes are busy ...
Regards, Bill--- fs/inode.c.old Tue Aug 12 07:49:18 1997 +++ fs/inode.c Thu Aug 14 08:35:47 1997 @@ -290,6 +297,39 @@ } busy = 1; } + +#ifdef INODE_PARANOIA + /* + * Display the busy inodes + */ + if (busy && root) { + struct list_head * tmp; + struct inode * inode; + struct dentry * alias; + + printk("Busy Inodes for Device %s:\n", kdevname(dev)); + for (tmp = head->next; tmp != head; tmp = tmp->next) { + inode = list_entry(tmp, struct inode, i_list); + if (inode->i_dev != dev) + continue; + if (inode == root) + continue; + if (!inode->i_count && !inode->i_state) + continue; + if (!list_empty(&inode->i_dentry)) { + alias = list_entry(inode->i_dentry.next, + struct dentry, d_alias); + printk("inode %s/%s: count=%d state=%lx\n", + alias->d_parent->d_name.name, + alias->d_name.name, + inode->i_count, inode->i_state); + } else + printk("inode %ld: count=%d state=%lx\n", + inode->i_ino, inode->i_count, + inode->i_state); + } + } +#endif return busy; } | |