From e389dd63bc56ec75ea3b0065cbb94689bef55b7d Mon Sep 17 00:00:00 2001 From: pschwan Date: Wed, 28 May 2003 18:58:09 +0000 Subject: [PATCH] The latest RH 2.4.20 errata kernel (-9) breaks the invalidate_show patch; here is a new one. --- .../patches/invalidate_show-2.4.20-rh.patch | 117 +++++++++++++++++++++ .../kernel_patches/pc/invalidate_show-2.4.20-rh.pc | 4 + lustre/kernel_patches/series/rh-2.4.20 | 2 +- 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 lustre/kernel_patches/patches/invalidate_show-2.4.20-rh.patch create mode 100644 lustre/kernel_patches/pc/invalidate_show-2.4.20-rh.pc diff --git a/lustre/kernel_patches/patches/invalidate_show-2.4.20-rh.patch b/lustre/kernel_patches/patches/invalidate_show-2.4.20-rh.patch new file mode 100644 index 0000000..77e82cc --- /dev/null +++ b/lustre/kernel_patches/patches/invalidate_show-2.4.20-rh.patch @@ -0,0 +1,117 @@ + + + + fs/inode.c | 23 +++++++++++++++-------- + fs/smbfs/inode.c | 2 +- + fs/super.c | 4 ++-- + include/linux/fs.h | 2 +- + 4 files changed, 19 insertions(+), 12 deletions(-) + +--- linux-2.4.20-9-l18/fs/inode.c~invalidate_show Wed May 28 01:07:01 2003 ++++ linux-2.4.20-9-l18-phil/fs/inode.c Wed May 28 01:16:37 2003 +@@ -628,7 +628,8 @@ static void dispose_list(struct list_hea + /* + * Invalidate all inodes for a device. + */ +-static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose) ++static int invalidate_list(struct list_head *head, struct super_block * sb, ++ struct list_head * dispose, int show) + { + struct list_head *next; + int busy = 0, count = 0; +@@ -653,6 +654,11 @@ static int invalidate_list(struct list_h + count++; + continue; + } ++ if (show) ++ printk(KERN_ERR ++ "inode busy: dev %s:%lu (%p) mode %o count %u\n", ++ kdevname(sb->s_dev), inode->i_ino, inode, ++ inode->i_mode, atomic_read(&inode->i_count)); + busy = 1; + } + /* only unused inodes may be cached with i_count zero */ +@@ -671,23 +677,24 @@ static int invalidate_list(struct list_h + /** + * invalidate_inodes - discard the inodes on a device + * @sb: superblock ++ * @show: whether we should display any busy inodes found + * + * Discard all of the inodes for a given superblock. If the discard + * fails because there are busy inodes then a non zero value is returned. + * If the discard is successful all the inodes have been discarded. + */ + +-int invalidate_inodes(struct super_block * sb) ++int invalidate_inodes(struct super_block * sb, int show) + { + int busy; + LIST_HEAD(throw_away); + + spin_lock(&inode_lock); +- busy = invalidate_list(&inode_in_use, sb, &throw_away); +- busy |= invalidate_list(&inode_unused, sb, &throw_away); +- busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away); +- busy |= invalidate_list(&sb->s_dirty, sb, &throw_away); +- busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away); ++ busy = invalidate_list(&inode_in_use, sb, &throw_away, show); ++ busy |= invalidate_list(&inode_unused, sb, &throw_away, show); ++ busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away, show); ++ busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show); ++ busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show); + spin_unlock(&inode_lock); + + dispose_list(&throw_away); +@@ -713,7 +720,7 @@ int invalidate_device(kdev_t dev, int do + * hold). + */ + shrink_dcache_sb(sb); +- res = invalidate_inodes(sb); ++ res = invalidate_inodes(sb, 0); + drop_super(sb); + } + invalidate_buffers(dev); +--- linux-2.4.20-9-l18/fs/super.c~invalidate_show Wed May 28 01:06:28 2003 ++++ linux-2.4.20-9-l18-phil/fs/super.c Wed May 28 01:15:45 2003 +@@ -943,7 +943,7 @@ void kill_super(struct super_block *sb) + lock_super(sb); + lock_kernel(); + sb->s_flags &= ~MS_ACTIVE; +- invalidate_inodes(sb); /* bad name - it should be evict_inodes() */ ++ invalidate_inodes(sb, 0); /* bad name - it should be evict_inodes() */ + if (sop) { + if (sop->write_super && sb->s_dirt) + sop->write_super(sb); +@@ -952,7 +952,7 @@ void kill_super(struct super_block *sb) + } + + /* Forget any remaining inodes */ +- if (invalidate_inodes(sb)) { ++ if (invalidate_inodes(sb, 1)) { + printk(KERN_ERR "VFS: Busy inodes after unmount. " + "Self-destruct in 5 seconds. Have a nice day...\n"); + } +--- linux-2.4.20-9-l18/include/linux/fs.h~invalidate_show Wed May 28 01:15:40 2003 ++++ linux-2.4.20-9-l18-phil/include/linux/fs.h Wed May 28 01:15:45 2003 +@@ -1287,7 +1287,7 @@ static inline void mark_buffer_dirty_ino + extern void set_buffer_flushtime(struct buffer_head *); + extern void balance_dirty(void); + extern int check_disk_change(kdev_t); +-extern int invalidate_inodes(struct super_block *); ++extern int invalidate_inodes(struct super_block *, int); + extern int invalidate_device(kdev_t, int); + extern void invalidate_inode_pages(struct inode *); + extern void invalidate_inode_pages2(struct address_space *); +--- linux-2.4.20-9-l18/fs/smbfs/inode.c~invalidate_show Thu Nov 28 18:53:15 2002 ++++ linux-2.4.20-9-l18-phil/fs/smbfs/inode.c Wed May 28 01:15:45 2003 +@@ -167,7 +167,7 @@ smb_invalidate_inodes(struct smb_sb_info + { + VERBOSE("\n"); + shrink_dcache_sb(SB_of(server)); +- invalidate_inodes(SB_of(server)); ++ invalidate_inodes(SB_of(server), 0); + } + + /* + +_ diff --git a/lustre/kernel_patches/pc/invalidate_show-2.4.20-rh.pc b/lustre/kernel_patches/pc/invalidate_show-2.4.20-rh.pc new file mode 100644 index 0000000..1d4ed77 --- /dev/null +++ b/lustre/kernel_patches/pc/invalidate_show-2.4.20-rh.pc @@ -0,0 +1,4 @@ +fs/inode.c +fs/super.c +include/linux/fs.h +fs/smbfs/inode.c diff --git a/lustre/kernel_patches/series/rh-2.4.20 b/lustre/kernel_patches/series/rh-2.4.20 index 11bfe66..4d29d24 100644 --- a/lustre/kernel_patches/series/rh-2.4.20 +++ b/lustre/kernel_patches/series/rh-2.4.20 @@ -5,7 +5,7 @@ exports_2.4.20-rh-hp.patch kmem_cache_validate_2.4.20-rh.patch lustre_version.patch vfs_intent-2.4.20-rh.patch -invalidate_show.patch +invalidate_show-2.4.20-rh.patch iod-rmap-exports-2.4.20.patch export-truncate.patch ext-2.4-patch-1-chaos.patch -- 1.8.3.1