From 19f0ee397d70635d5ffab44828bae3ee1f3e055c Mon Sep 17 00:00:00 2001 From: zab Date: Tue, 15 Jul 2003 19:36:50 +0000 Subject: [PATCH] - bring recent b_unify fixes into b_filterio (UNIFY_FILTERIO_UPDATE_CHILD_20030715) --- lustre/kernel_patches/patches/inode_unhash.patch | 77 ++++++++++++++++++++++ .../patches/inode_unhash_2.5.75.patch | 77 ++++++++++++++++++++++ lustre/kernel_patches/pc/inode-unhash_2.5.75.pc | 2 + lustre/kernel_patches/pc/inode_unhash.pc | 2 + lustre/kernel_patches/pc/inode_unhash_2.5.75.pc | 2 + 5 files changed, 160 insertions(+) create mode 100644 lustre/kernel_patches/patches/inode_unhash.patch create mode 100644 lustre/kernel_patches/patches/inode_unhash_2.5.75.patch create mode 100644 lustre/kernel_patches/pc/inode-unhash_2.5.75.pc create mode 100644 lustre/kernel_patches/pc/inode_unhash.pc create mode 100644 lustre/kernel_patches/pc/inode_unhash_2.5.75.pc diff --git a/lustre/kernel_patches/patches/inode_unhash.patch b/lustre/kernel_patches/patches/inode_unhash.patch new file mode 100644 index 0000000..57024b5 --- /dev/null +++ b/lustre/kernel_patches/patches/inode_unhash.patch @@ -0,0 +1,77 @@ + fs/inode.c | 21 ++++++++++++++++++++- + include/linux/fs.h | 1 + + 2 files changed, 21 insertions(+), 1 deletion(-) + +--- linux-2.4.20/fs/inode.c~inode_unhash 2003-07-13 15:23:43.000000000 -0600 ++++ linux-2.4.20-braam/fs/inode.c 2003-07-13 17:33:44.000000000 -0600 +@@ -550,6 +552,18 @@ static void dispose_list(struct list_hea + } + } + ++/** unhash_notify - notify the FS that an inode is being unhashed ++ * @inode: inode being unhashed ++ * ++ * the unhash_inode method must not block ++ */ ++static void unhash_notify(struct inode *inode) ++{ ++ if (inode->i_sb && inode->i_sb->s_op && ++ inode->i_sb->s_op->unhash_inode) ++ inode->i_sb->s_op->unhash_inode(inode); ++} ++ + /* + * Invalidate all inodes for a device. + */ +@@ -572,6 +586,7 @@ static int invalidate_list(struct list_h + continue; + invalidate_inode_buffers(inode); + if (!atomic_read(&inode->i_count)) { ++ unhash_notify(inode); + list_del_init(&inode->i_hash); + list_del(&inode->i_list); + list_add(&inode->i_list, dispose); +@@ -692,6 +707,7 @@ void prune_icache(int goal) + if (atomic_read(&inode->i_count)) + continue; + list_del(tmp); ++ unhash_notify(inode); + list_del(&inode->i_hash); + INIT_LIST_HEAD(&inode->i_hash); + list_add(tmp, freeable); +@@ -1018,6 +1034,7 @@ void insert_inode_hash(struct inode *ino + void remove_inode_hash(struct inode *inode) + { + spin_lock(&inode_lock); ++ unhash_notify(inode); + list_del(&inode->i_hash); + INIT_LIST_HEAD(&inode->i_hash); + spin_unlock(&inode_lock); +@@ -1049,6 +1066,7 @@ void iput(struct inode *inode) + return; + + if (!inode->i_nlink) { ++ unhash_notify(inode); + list_del(&inode->i_hash); + INIT_LIST_HEAD(&inode->i_hash); + list_del(&inode->i_list); +@@ -1083,6 +1101,7 @@ void iput(struct inode *inode) + write_inode_now(inode, 1); + spin_lock(&inode_lock); + inodes_stat.nr_unused--; ++ unhash_notify(inode); + list_del_init(&inode->i_hash); + } + list_del_init(&inode->i_list); +--- linux-2.4.20/include/linux/fs.h~inode_unhash 2003-07-13 15:23:43.000000000 -0600 ++++ linux-2.4.20-braam/include/linux/fs.h 2003-07-13 17:26:03.000000000 -0600 +@@ -920,6 +920,7 @@ struct super_operations { + int (*statfs) (struct super_block *, struct statfs *); + int (*remount_fs) (struct super_block *, int *, char *); + void (*clear_inode) (struct inode *); ++ void (*unhash_inode) (struct inode *); + void (*umount_begin) (struct super_block *); + + /* Following are for knfsd to interact with "interesting" filesystems + +_ diff --git a/lustre/kernel_patches/patches/inode_unhash_2.5.75.patch b/lustre/kernel_patches/patches/inode_unhash_2.5.75.patch new file mode 100644 index 0000000..73a6cf5 --- /dev/null +++ b/lustre/kernel_patches/patches/inode_unhash_2.5.75.patch @@ -0,0 +1,77 @@ + fs/inode.c | 17 +++++++++++++++++ + include/linux/fs.h | 1 + + 2 files changed, 18 insertions(+) + +--- linux-2.5.73/fs/inode.c~inode_unhash_2.5.75 2003-06-22 12:33:34.000000000 -0600 ++++ linux-2.5.73-braam/fs/inode.c 2003-07-15 02:15:24.000000000 -0600 +@@ -272,6 +272,18 @@ static void dispose_list(struct list_hea + spin_unlock(&inode_lock); + } + ++/** unhash_notify - notify the FS that an inode is being unhashed ++ * @inode: inode being unhashed ++ * ++ * the unhash_inode method must not block ++ */ ++static void unhash_notify(struct inode *inode) ++{ ++ if (inode->i_sb && inode->i_sb->s_op && ++ inode->i_sb->s_op->unhash_inode) ++ inode->i_sb->s_op->unhash_inode(inode); ++} ++ + /* + * Invalidate all inodes for a device. + */ +@@ -293,6 +305,7 @@ static int invalidate_list(struct list_h + continue; + invalidate_inode_buffers(inode); + if (!atomic_read(&inode->i_count)) { ++ unhash_notify(inode); + hlist_del_init(&inode->i_hash); + list_del(&inode->i_list); + list_add(&inode->i_list, dispose); +@@ -429,6 +442,7 @@ static void prune_icache(int nr_to_scan) + if (!can_unuse(inode)) + continue; + } ++ unhash_notify(inode); + hlist_del_init(&inode->i_hash); + list_move(&inode->i_list, &freeable); + inode->i_state |= I_FREEING; +@@ -938,6 +952,7 @@ void __insert_inode_hash(struct inode *i + void remove_inode_hash(struct inode *inode) + { + spin_lock(&inode_lock); ++ unhash_notify(inode); + hlist_del_init(&inode->i_hash); + spin_unlock(&inode_lock); + } +@@ -977,6 +992,7 @@ void generic_delete_inode(struct inode * + } else + clear_inode(inode); + spin_lock(&inode_lock); ++ unhash_notify(inode); + hlist_del_init(&inode->i_hash); + spin_unlock(&inode_lock); + wake_up_inode(inode); +@@ -1002,6 +1018,7 @@ static void generic_forget_inode(struct + write_inode_now(inode, 1); + spin_lock(&inode_lock); + inodes_stat.nr_unused--; ++ unhash_notify(inode); + hlist_del_init(&inode->i_hash); + } + list_del_init(&inode->i_list); +--- linux-2.5.73/include/linux/fs.h~inode_unhash_2.5.75 2003-07-01 11:13:41.000000000 -0600 ++++ linux-2.5.73-braam/include/linux/fs.h 2003-07-15 02:11:47.000000000 -0600 +@@ -799,6 +799,7 @@ struct super_operations { + int (*statfs) (struct super_block *, struct kstatfs *); + int (*remount_fs) (struct super_block *, int *, char *); + void (*clear_inode) (struct inode *); ++ void (*unhash_inode) (struct inode *); + void (*umount_begin) (struct super_block *); + + int (*show_options)(struct seq_file *, struct vfsmount *); + +_ diff --git a/lustre/kernel_patches/pc/inode-unhash_2.5.75.pc b/lustre/kernel_patches/pc/inode-unhash_2.5.75.pc new file mode 100644 index 0000000..7d04f84 --- /dev/null +++ b/lustre/kernel_patches/pc/inode-unhash_2.5.75.pc @@ -0,0 +1,2 @@ +fs/inode.c +include/linux/fs.h diff --git a/lustre/kernel_patches/pc/inode_unhash.pc b/lustre/kernel_patches/pc/inode_unhash.pc new file mode 100644 index 0000000..7d04f84 --- /dev/null +++ b/lustre/kernel_patches/pc/inode_unhash.pc @@ -0,0 +1,2 @@ +fs/inode.c +include/linux/fs.h diff --git a/lustre/kernel_patches/pc/inode_unhash_2.5.75.pc b/lustre/kernel_patches/pc/inode_unhash_2.5.75.pc new file mode 100644 index 0000000..7d04f84 --- /dev/null +++ b/lustre/kernel_patches/pc/inode_unhash_2.5.75.pc @@ -0,0 +1,2 @@ +fs/inode.c +include/linux/fs.h -- 1.8.3.1