[prev in list] [next in list] [prev in thread] [next in thread]
List: lustre-cvs
Subject: [lustre-cvs] HEAD: lustre/kernel_patches/patches ext3-truncate-buffer-head.patch iopen-2.4.18-2.patc
From: Andreas Dilger <adilger () moraine ! clusterfs ! com>
Date: 2004-02-20 20:32:29
Message-ID: 200402202032.i1KKWTR8022826 () lists ! clusterfs ! com
[Download RAW message or body]
Update of /cvsroot/lustre/lustre/kernel_patches/patches
In directory moraine.clusterfs.com:/tmp/cvs-serv22531/kernel_patches/patches
Modified Files:
iopen-2.4.18-2.patch iopen-2.4.18.patch
iopen-2.4.19-suse.patch iopen-2.4.20.patch
iopen-2.4.21-chaos.patch
Added Files:
ext3-truncate-buffer-head.patch
Log Message:
Lustre v1.0.4
--- NEW FILE ---
--- lum/fs/ext3/inode.c~ 2004-01-30 16:47:12.000000000 -0800
+++ lum/fs/ext3/inode.c 2004-01-30 16:46:14.000000000 -0800
@@ -1485,6 +1485,7 @@
if (ext3_should_order_data(inode))
err = ext3_journal_dirty_data(handle, bh, 0);
__mark_buffer_dirty(bh);
+ buffer_insert_inode_data_queue(bh, inode);
}
unlock:
Index: iopen-2.4.18-2.patch
===================================================================
RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/iopen-2.4.18-2.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -b -B -p -r1.2 -r1.3
--- iopen-2.4.18-2.patch 15 Dec 2003 06:46:04 -0000 1.2
+++ iopen-2.4.18-2.patch 20 Feb 2004 20:32:21 -0000 1.3
@@ -66,7 +66,7 @@
bh = iloc.bh;
--- /dev/null 2003-01-30 03:24:37.000000000 -0700
+++ linux-2.4.18-p4smp-braam/fs/ext3/iopen.c 2003-07-09 17:13:02.000000000 -0600
-@@ -0,0 +1,259 @@
+@@ -0,0 +1,258 @@
+/*
+ * linux/fs/ext3/iopen.c
+ *
@@ -151,6 +151,9 @@
+ return ERR_PTR(-ENOENT);
+ }
+
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++
+ /* preferrably return a connected dentry */
+ spin_lock(&dcache_lock);
+ list_for_each(lp, &inode->i_dentry) {
@@ -168,9 +171,14 @@
+ return alternate;
+ }
+ dentry->d_flags |= DCACHE_NFSD_DISCONNECTED;
++
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
+ spin_unlock(&dcache_lock);
+
-+ d_add(dentry, inode);
+ return NULL;
+}
+
@@ -195,6 +203,7 @@
+
+/* This function is spliced into ext3_lookup and does the move of a
+ * disconnected dentry (if it exists) to a connected dentry.
++ * Caller must hold dcache_lock.
+ */
+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode)
+{
@@ -202,13 +211,6 @@
+ struct list_head *lp;
+
+ /* preferrably return a connected dentry */
-+ spin_lock(&dcache_lock);
-+ /* verify this dentry is really new */
-+ assert(!de->d_inode);
-+ assert(list_empty(&de->d_subdirs));
-+ assert(list_empty(&de->d_alias));
-+
-+
+ list_for_each(lp, &inode->i_dentry) {
+ tmp = list_entry(lp, struct dentry, d_alias);
+ if (tmp->d_flags & DCACHE_NFSD_DISCONNECTED) {
@@ -220,15 +222,12 @@
+ }
+ }
+
-+ if (!goal) {
-+ spin_unlock(&dcache_lock);
++ if (!goal)
+ return NULL;
-+ }
+
+ /* Move the goal to the de hash queue - like d_move() */
+ goal->d_flags &= ~DCACHE_NFSD_DISCONNECTED;
-+ list_del(&goal->d_hash);
-+ list_add(&goal->d_hash, &de->d_hash);
++ list_del_init(&goal->d_hash);
+
+ list_del(&goal->d_child);
+ list_del(&de->d_child);
@@ -242,7 +241,7 @@
+ /* And add them back to the (new) parent lists */
+ list_add(&goal->d_child, &goal->d_parent->d_subdirs);
+ list_add(&de->d_child, &de->d_parent->d_subdirs);
-+ spin_unlock(&dcache_lock);
++ __d_rehash(goal, 0);
+
+ return goal;
+}
@@ -328,7 +327,7 @@
+}
--- /dev/null 2003-01-30 03:24:37.000000000 -0700
+++ linux-2.4.18-p4smp-braam/fs/ext3/iopen.h 2003-07-09 17:13:02.000000000 -0600
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,15 @@
+/*
+ * iopen.h
+ *
@@ -342,6 +341,8 @@
+
+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
+extern int ext3_iopen_get_inode(struct inode *inode);
++extern struct dentry *iopen_connect_dentry(struct dentry *de,
++ struct inode *inode);
--- linux-2.4.18-p4smp/fs/ext3/namei.c~iopen-2.4.18 2003-07-09 13:32:38.000000000 -0600
+++ linux-2.4.18-p4smp-braam/fs/ext3/namei.c 2003-07-09 17:13:02.000000000 -0600
@@ -34,6 +34,7 @@
@@ -352,14 +353,7 @@
/*
* define how far ahead to read directories while searching them.
-@@ -703,16 +704,21 @@ cleanup_and_exit:
- return NULL;
- }
- #endif
-+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode);
-
- static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
- {
+@@ -709,10 +710,14 @@ cleanup_and_exit:
struct inode * inode;
struct ext3_dir_entry_2 * de;
struct buffer_head * bh;
@@ -374,29 +368,47 @@
bh = ext3_find_entry(dentry, &de);
inode = NULL;
if (bh) {
-@@ -723,6 +729,12 @@ static struct dentry *ext3_lookup(struct
+@@ -723,7 +729,28 @@ static struct dentry *ext3_lookup(struct
if (!inode)
return ERR_PTR(-EACCES);
}
+- d_add(dentry, inode);
++
++ /* verify this dentry is really new */
++ assert(!dentry->d_inode);
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++ assert(list_empty(&dentry->d_subdirs));
+
++ spin_lock(&dcache_lock);
+ if (inode && (alternate = iopen_connect_dentry(dentry, inode))) {
++ spin_unlock(&dcache_lock);
+ iput(inode);
+ return alternate;
+ }
+
- d_add(dentry, inode);
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ if (inode) /* d_instantiate */
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
++ spin_unlock(&dcache_lock);
++
return NULL;
}
+
--- linux-2.4.18-p4smp/fs/ext3/super.c~iopen-2.4.18 2003-07-09 13:32:38.000000000 -0600
+++ linux-2.4.18-p4smp-braam/fs/ext3/super.c 2003-07-09 17:13:02.000000000 -0600
-@@ -831,6 +831,17 @@ static int parse_options (char * options
+@@ -831,6 +831,18 @@ static int parse_options (char * options
|| !strcmp (this_char, "quota")
|| !strcmp (this_char, "usrquota"))
/* Don't do anything ;-) */ ;
+ else if (!strcmp (this_char, "iopen")) {
+ set_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+ } else if (!strcmp (this_char, "noiopen")) {
++ }
++ else if (!strcmp (this_char, "noiopen")) {
+ clear_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
+ }
Index: iopen-2.4.18.patch
===================================================================
RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/iopen-2.4.18.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- iopen-2.4.18.patch 15 Dec 2003 06:46:04 -0000 1.5
+++ iopen-2.4.18.patch 20 Feb 2004 20:32:21 -0000 1.6
@@ -66,7 +66,7 @@
bh = iloc.bh;
--- /dev/null 2003-01-30 03:24:37.000000000 -0700
+++ linux-2.4.18-p4smp-braam/fs/ext3/iopen.c 2003-07-09 17:13:02.000000000 -0600
-@@ -0,0 +1,259 @@
+@@ -0,0 +1,258 @@
+/*
+ * linux/fs/ext3/iopen.c
+ *
@@ -151,6 +151,9 @@
+ return ERR_PTR(-ENOENT);
+ }
+
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++
+ /* preferrably return a connected dentry */
+ spin_lock(&dcache_lock);
+ list_for_each(lp, &inode->i_dentry) {
@@ -168,9 +171,14 @@
+ return alternate;
+ }
+ dentry->d_flags |= DCACHE_NFSD_DISCONNECTED;
++
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
+ spin_unlock(&dcache_lock);
+
-+ d_add(dentry, inode);
+ return NULL;
+}
+
@@ -195,6 +203,7 @@
+
+/* This function is spliced into ext3_lookup and does the move of a
+ * disconnected dentry (if it exists) to a connected dentry.
++ * Caller must hold dcache_lock.
+ */
+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode)
+{
@@ -202,13 +211,6 @@
+ struct list_head *lp;
+
+ /* preferrably return a connected dentry */
-+ spin_lock(&dcache_lock);
-+ /* verify this dentry is really new */
-+ assert(!de->d_inode);
-+ assert(list_empty(&de->d_subdirs));
-+ assert(list_empty(&de->d_alias));
-+
-+
+ list_for_each(lp, &inode->i_dentry) {
+ tmp = list_entry(lp, struct dentry, d_alias);
+ if (tmp->d_flags & DCACHE_NFSD_DISCONNECTED) {
@@ -220,10 +222,8 @@
+ }
+ }
+
-+ if (!goal) {
-+ spin_unlock(&dcache_lock);
++ if (!goal)
+ return NULL;
-+ }
+
+ /* Move the goal to the de hash queue - like d_move() */
+ goal->d_flags &= ~DCACHE_NFSD_DISCONNECTED;
@@ -242,7 +242,6 @@
+ list_add(&goal->d_child, &goal->d_parent->d_subdirs);
+ list_add(&de->d_child, &de->d_parent->d_subdirs);
+ __d_rehash(goal, 0);
-+ spin_unlock(&dcache_lock);
+
+ return goal;
+}
@@ -328,7 +327,7 @@
+}
--- /dev/null 2003-01-30 03:24:37.000000000 -0700
+++ linux-2.4.18-p4smp-braam/fs/ext3/iopen.h 2003-07-09 17:13:02.000000000 -0600
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,15 @@
+/*
+ * iopen.h
+ *
@@ -342,6 +341,8 @@
+
+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
+extern int ext3_iopen_get_inode(struct inode *inode);
++extern struct dentry *iopen_connect_dentry(struct dentry *de,
++ struct inode *inode);
--- linux-2.4.18-p4smp/fs/ext3/namei.c~iopen-2.4.18 2003-07-09 13:32:38.000000000 -0600
+++ linux-2.4.18-p4smp-braam/fs/ext3/namei.c 2003-07-09 17:13:02.000000000 -0600
@@ -34,6 +34,7 @@
@@ -352,14 +353,7 @@
/*
* define how far ahead to read directories while searching them.
-@@ -703,16 +704,21 @@ cleanup_and_exit:
- brelse (bh_use[ra_ptr]);
- return ret;
- }
-+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode);
-
- static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
- {
+@@ -703,10 +704,14 @@ cleanup_and_exit:
struct inode * inode;
struct ext3_dir_entry_2 * de;
struct buffer_head * bh;
@@ -374,29 +368,47 @@
bh = ext3_find_entry(dentry, &de);
inode = NULL;
if (bh) {
-@@ -723,6 +729,12 @@ static struct dentry *ext3_lookup(struct
+@@ -723,7 +729,28 @@ static struct dentry *ext3_lookup(struct
if (!inode)
return ERR_PTR(-EACCES);
}
+- d_add(dentry, inode);
++
++ /* verify this dentry is really new */
++ assert(!dentry->d_inode);
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++ assert(list_empty(&dentry->d_subdirs));
+
++ spin_lock(&dcache_lock);
+ if (inode && (alternate = iopen_connect_dentry(dentry, inode))) {
++ spin_unlock(&dcache_lock);
+ iput(inode);
+ return alternate;
+ }
+
- d_add(dentry, inode);
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ if (inode) /* d_instantiate */
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
++ spin_unlock(&dcache_lock);
++
return NULL;
}
+
--- linux-2.4.18-p4smp/fs/ext3/super.c~iopen-2.4.18 2003-07-09 13:32:38.000000000 -0600
+++ linux-2.4.18-p4smp-braam/fs/ext3/super.c 2003-07-09 17:13:02.000000000 -0600
-@@ -831,6 +831,17 @@ static int parse_options (char * options
+@@ -831,6 +831,18 @@ static int parse_options (char * options
|| !strcmp (this_char, "quota")
|| !strcmp (this_char, "usrquota"))
/* Don't do anything ;-) */ ;
+ else if (!strcmp (this_char, "iopen")) {
+ set_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+ } else if (!strcmp (this_char, "noiopen")) {
++ }
++ else if (!strcmp (this_char, "noiopen")) {
+ clear_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
+ }
Index: iopen-2.4.19-suse.patch
===================================================================
RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/iopen-2.4.19-suse.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -b -B -p -r1.2 -r1.3
--- iopen-2.4.19-suse.patch 15 Dec 2003 06:46:04 -0000 1.2
+++ iopen-2.4.19-suse.patch 20 Feb 2004 20:32:21 -0000 1.3
@@ -74,7 +74,7 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
===================================================================
--- linux-2.4.19.SuSE.orig/fs/ext3/iopen.c Sun Nov 16 01:27:31 2003
+++ linux-2.4.19.SuSE/fs/ext3/iopen.c Sun Nov 16 01:27:31 2003
-@@ -0,0 +1,259 @@
+@@ -0,0 +1,258 @@
+/*
+ * linux/fs/ext3/iopen.c
+ *
@@ -159,6 +159,9 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+ return ERR_PTR(-ENOENT);
+ }
+
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++
+ /* preferrably return a connected dentry */
+ spin_lock(&dcache_lock);
+ list_for_each(lp, &inode->i_dentry) {
@@ -176,9 +179,14 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+ return alternate;
+ }
+ dentry->d_flags |= DCACHE_NFSD_DISCONNECTED;
++
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
+ spin_unlock(&dcache_lock);
+
-+ d_add(dentry, inode);
+ return NULL;
+}
+
@@ -203,6 +211,7 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+
+/* This function is spliced into ext3_lookup and does the move of a
+ * disconnected dentry (if it exists) to a connected dentry.
++ * Caller must hold dcache_lock.
+ */
+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode)
+{
@@ -210,13 +219,6 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+ struct list_head *lp;
+
+ /* preferrably return a connected dentry */
-+ spin_lock(&dcache_lock);
-+ /* verify this dentry is really new */
-+ assert(!de->d_inode);
-+ assert(list_empty(&de->d_subdirs));
-+ assert(list_empty(&de->d_alias));
-+
-+
+ list_for_each(lp, &inode->i_dentry) {
+ tmp = list_entry(lp, struct dentry, d_alias);
+ if (tmp->d_flags & DCACHE_NFSD_DISCONNECTED) {
@@ -228,10 +230,8 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+ }
+ }
+
-+ if (!goal) {
-+ spin_unlock(&dcache_lock);
++ if (!goal)
+ return NULL;
-+ }
+
+ /* Move the goal to the de hash queue - like d_move() */
+ goal->d_flags &= ~DCACHE_NFSD_DISCONNECTED;
@@ -250,7 +250,6 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.c
+ list_add(&goal->d_child, &goal->d_parent->d_subdirs);
+ list_add(&de->d_child, &de->d_parent->d_subdirs);
+ __d_rehash(goal, 0);
-+ spin_unlock(&dcache_lock);
+
+ return goal;
+}
@@ -338,7 +337,7 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.h
===================================================================
--- linux-2.4.19.SuSE.orig/fs/ext3/iopen.h Sun Nov 16 01:27:31 2003
+++ linux-2.4.19.SuSE/fs/ext3/iopen.h Sun Nov 16 01:27:31 2003
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,15 @@
+/*
+ * iopen.h
+ *
@@ -352,6 +351,8 @@ Index: linux-2.4.19.SuSE/fs/ext3/iopen.h
+
+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
+extern int ext3_iopen_get_inode(struct inode *inode);
++extern struct dentry *iopen_connect_dentry(struct dentry *de,
++ struct inode *inode);
Index: linux-2.4.19.SuSE/fs/ext3/namei.c
===================================================================
--- linux-2.4.19.SuSE.orig/fs/ext3/namei.c Sun Nov 16 01:23:20 2003
@@ -365,14 +366,7 @@ Index: linux-2.4.19.SuSE/fs/ext3/namei.c
/*
* define how far ahead to read directories while searching them.
-@@ -922,16 +922,21 @@
- return NULL;
- }
- #endif
-+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode);
-
- static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
- {
+@@ -922,10 +922,14 @@
struct inode * inode;
struct ext3_dir_entry_2 * de;
struct buffer_head * bh;
@@ -387,31 +381,49 @@ Index: linux-2.4.19.SuSE/fs/ext3/namei.c
bh = ext3_find_entry(dentry, &de);
inode = NULL;
if (bh) {
-@@ -943,6 +948,12 @@
+@@ -943,7 +948,28 @@
return ERR_PTR(-EACCES);
}
}
+- d_add(dentry, inode);
++
++ /* verify this dentry is really new */
++ assert(!dentry->d_inode);
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++ assert(list_empty(&dentry->d_subdirs));
+
++ spin_lock(&dcache_lock);
+ if (inode && (alternate = iopen_connect_dentry(dentry, inode))) {
++ spin_unlock(&dcache_lock);
+ iput(inode);
+ return alternate;
+ }
+
- d_add(dentry, inode);
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ if (inode) /* d_instantiate */
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
++ spin_unlock(&dcache_lock);
++
return NULL;
}
+
Index: linux-2.4.19.SuSE/fs/ext3/super.c
===================================================================
--- linux-2.4.19.SuSE.orig/fs/ext3/super.c Sun Nov 16 01:19:22 2003
+++ linux-2.4.19.SuSE/fs/ext3/super.c Sun Nov 16 01:27:31 2003
-@@ -864,6 +864,17 @@
+@@ -864,6 +864,18 @@
|| !strcmp (this_char, "quota")
|| !strcmp (this_char, "usrquota"))
/* Don't do anything ;-) */ ;
+ else if (!strcmp (this_char, "iopen")) {
+ set_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+ } else if (!strcmp (this_char, "noiopen")) {
++ }
++ else if (!strcmp (this_char, "noiopen")) {
+ clear_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
+ }
Index: iopen-2.4.20.patch
===================================================================
RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/iopen-2.4.20.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- iopen-2.4.20.patch 15 Dec 2003 06:46:04 -0000 1.4
+++ iopen-2.4.20.patch 20 Feb 2004 20:32:21 -0000 1.5
@@ -8,9 +8,11 @@
include/linux/ext3_fs.h | 2
8 files changed, 318 insertions(+), 2 deletions(-)
---- linux/Documentation/filesystems/ext2.txt~iopen-2.4.20 Wed Jul 11 15:44:45 2001
-+++ linux-mmonroe/Documentation/filesystems/ext2.txt Thu Jul 10 12:28:54 2003
-@@ -35,6 +35,22 @@ resgid=n The group ID which may use th
+Index: linux-2.4.22-uml/Documentation/filesystems/ext2.txt
+===================================================================
+--- linux-2.4.22-uml.orig/Documentation/filesystems/ext2.txt 2001-07-11 16:44:45.000000000 -0600
++++ linux-2.4.22-uml/Documentation/filesystems/ext2.txt 2004-01-30 14:18:10.000000000 -0700
+@@ -35,6 +35,22 @@
sb=n Use alternate superblock at this location.
@@ -33,9 +35,11 @@
grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2.
---- linux/fs/ext3/Makefile~iopen-2.4.20 Thu Jul 10 12:28:44 2003
-+++ linux-mmonroe/fs/ext3/Makefile Thu Jul 10 12:28:54 2003
-@@ -11,7 +11,7 @@ O_TARGET := ext3.o
+Index: linux-2.4.22-uml/fs/ext3/Makefile
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/Makefile 2004-01-30 14:17:58.000000000 -0700
++++ linux-2.4.22-uml/fs/ext3/Makefile 2004-01-30 14:18:10.000000000 -0700
+@@ -11,7 +11,7 @@
export-objs := ext3-exports.o
@@ -44,8 +48,10 @@
ioctl.o namei.o super.o symlink.o hash.o ext3-exports.o
obj-m := $(O_TARGET)
---- linux/fs/ext3/inode.c~iopen-2.4.20 Thu Jul 10 12:28:46 2003
-+++ linux-mmonroe/fs/ext3/inode.c Thu Jul 10 12:28:54 2003
+Index: linux-2.4.22-uml/fs/ext3/inode.c
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/inode.c 2004-01-30 14:17:59.000000000 -0700
++++ linux-2.4.22-uml/fs/ext3/inode.c 2004-01-30 14:18:10.000000000 -0700
@@ -31,6 +31,7 @@
#include <linux/highuid.h>
#include <linux/quotaops.h>
@@ -54,7 +60,7 @@
/*
* SEARCH_FROM_ZERO forces each block allocation to search from the start
-@@ -2253,6 +2254,9 @@ void ext3_read_inode(struct inode * inod
+@@ -2153,6 +2154,9 @@
struct buffer_head *bh;
int block;
@@ -64,9 +70,11 @@
if(ext3_get_inode_loc(inode, &iloc))
goto bad_inode;
bh = iloc.bh;
---- /dev/null Tue Jan 28 04:00:01 2003
-+++ linux-mmonroe/fs/ext3/iopen.c Thu Jul 10 12:28:54 2003
-@@ -0,0 +1,259 @@
+Index: linux-2.4.22-uml/fs/ext3/iopen.c
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/iopen.c 2004-01-30 14:18:10.000000000 -0700
++++ linux-2.4.22-uml/fs/ext3/iopen.c 2004-01-30 14:18:10.000000000 -0700
+@@ -0,0 +1,258 @@
+/*
+ * linux/fs/ext3/iopen.c
+ *
@@ -151,6 +159,9 @@
+ return ERR_PTR(-ENOENT);
+ }
+
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++
+ /* preferrably return a connected dentry */
+ spin_lock(&dcache_lock);
+ list_for_each(lp, &inode->i_dentry) {
@@ -168,9 +179,14 @@
+ return alternate;
+ }
+ dentry->d_flags |= DCACHE_NFSD_DISCONNECTED;
++
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
+ spin_unlock(&dcache_lock);
+
-+ d_add(dentry, inode);
+ return NULL;
+}
+
@@ -195,6 +211,7 @@
+
+/* This function is spliced into ext3_lookup and does the move of a
+ * disconnected dentry (if it exists) to a connected dentry.
++ * Caller must hold dcache_lock.
+ */
+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode)
+{
@@ -202,13 +219,6 @@
+ struct list_head *lp;
+
+ /* preferrably return a connected dentry */
-+ spin_lock(&dcache_lock);
-+ /* verify this dentry is really new */
-+ assert(!de->d_inode);
-+ assert(list_empty(&de->d_subdirs));
-+ assert(list_empty(&de->d_alias));
-+
-+
+ list_for_each(lp, &inode->i_dentry) {
+ tmp = list_entry(lp, struct dentry, d_alias);
+ if (tmp->d_flags & DCACHE_NFSD_DISCONNECTED) {
@@ -220,10 +230,8 @@
+ }
+ }
+
-+ if (!goal) {
-+ spin_unlock(&dcache_lock);
++ if (!goal)
+ return NULL;
-+ }
+
+ /* Move the goal to the de hash queue - like d_move() */
+ goal->d_flags &= ~DCACHE_NFSD_DISCONNECTED;
@@ -242,7 +250,6 @@
+ list_add(&goal->d_child, &goal->d_parent->d_subdirs);
+ list_add(&de->d_child, &de->d_parent->d_subdirs);
+ __d_rehash(goal, 0);
-+ spin_unlock(&dcache_lock);
+
+ return goal;
+}
@@ -326,9 +333,11 @@
+
+ return 1;
+}
---- /dev/null Tue Jan 28 04:00:01 2003
-+++ linux-mmonroe/fs/ext3/iopen.h Thu Jul 10 12:28:54 2003
-@@ -0,0 +1,13 @@
+Index: linux-2.4.22-uml/fs/ext3/iopen.h
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/iopen.h 2004-01-30 14:18:10.000000000 -0700
++++ linux-2.4.22-uml/fs/ext3/iopen.h 2004-01-30 14:18:10.000000000 -0700
+@@ -0,0 +1,15 @@
+/*
+ * iopen.h
+ *
@@ -342,8 +351,12 @@
+
+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
+extern int ext3_iopen_get_inode(struct inode *inode);
---- linux/fs/ext3/namei.c~iopen-2.4.20 Thu Jul 10 12:28:46 2003
-+++ linux-mmonroe/fs/ext3/namei.c Thu Jul 10 12:28:54 2003
++extern struct dentry *iopen_connect_dentry(struct dentry *de,
++ struct inode *inode);
+Index: linux-2.4.22-uml/fs/ext3/namei.c
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/namei.c 2004-01-30 14:17:59.000000000 -0700
++++ linux-2.4.22-uml/fs/ext3/namei.c 2004-01-30 14:19:44.000000000 -0700
@@ -35,7 +35,7 @@
#include <linux/string.h>
#include <linux/locks.h>
@@ -353,14 +366,7 @@
/*
* define how far ahead to read directories while searching them.
-@@ -921,16 +921,21 @@ errout:
- return NULL;
- }
- #endif
-+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode);
-
- static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
- {
+@@ -927,10 +927,14 @@
struct inode * inode;
struct ext3_dir_entry_2 * de;
struct buffer_head * bh;
@@ -375,29 +381,49 @@
bh = ext3_find_entry(dentry, &de);
inode = NULL;
if (bh) {
-@@ -942,6 +947,12 @@ static struct dentry *ext3_lookup(struct
+@@ -942,7 +946,28 @@
return ERR_PTR(-EACCES);
}
}
+- d_add(dentry, inode);
++
++ /* verify this dentry is really new */
++ assert(!dentry->d_inode);
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++ assert(list_empty(&dentry->d_subdirs));
+
++ spin_lock(&dcache_lock);
+ if (inode && (alternate = iopen_connect_dentry(dentry, inode))) {
++ spin_unlock(&dcache_lock);
+ iput(inode);
+ return alternate;
+ }
+
- d_add(dentry, inode);
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ if (inode) /* d_instantiate */
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
++ spin_unlock(&dcache_lock);
++
return NULL;
}
---- linux/fs/ext3/super.c~iopen-2.4.20 Thu Jul 10 12:28:45 2003
-+++ linux-mmonroe/fs/ext3/super.c Thu Jul 10 12:28:54 2003
-@@ -835,6 +835,17 @@ static int parse_options (char * options
+
+Index: linux-2.4.22-uml/fs/ext3/super.c
+===================================================================
+--- linux-2.4.22-uml.orig/fs/ext3/super.c Sun Nov 16 01:19:22 2003
++++ linux-2.4.22-uml/fs/ext3/super.c Sun Nov 16 01:27:31 2003
+@@ -839,6 +839,18 @@
|| !strcmp (this_char, "quota")
|| !strcmp (this_char, "usrquota"))
/* Don't do anything ;-) */ ;
+ else if (!strcmp (this_char, "iopen")) {
+ set_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+ } else if (!strcmp (this_char, "noiopen")) {
++ }
++ else if (!strcmp (this_char, "noiopen")) {
+ clear_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
+ }
@@ -408,9 +434,11 @@
else if (!strcmp (this_char, "journal")) {
/* @@@ FIXME */
/* Eventually we will want to be able to create
---- linux/include/linux/ext3_fs.h~iopen-2.4.20 Thu Jul 10 12:28:46 2003
-+++ linux-mmonroe/include/linux/ext3_fs.h Thu Jul 10 12:30:12 2003
-@@ -322,6 +322,8 @@ struct ext3_inode {
+Index: linux-2.4.22-uml/include/linux/ext3_fs.h
+===================================================================
+--- linux-2.4.22-uml.orig/include/linux/ext3_fs.h 2004-01-30 14:17:59.000000000 -0700
++++ linux-2.4.22-uml/include/linux/ext3_fs.h 2004-01-30 14:18:10.000000000 -0700
+@@ -322,6 +322,8 @@
#define EXT3_MOUNT_UPDATE_JOURNAL 0x1000 /* Update the journal format */
#define EXT3_MOUNT_NO_UID32 0x2000 /* Disable 32-bit UIDs */
#define EXT3_MOUNT_XATTR_USER 0x4000 /* Extended user attributes */
@@ -419,5 +447,3 @@
#define EXT3_MOUNT_ASYNCDEL 0x20000 /* Delayed deletion */
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
-
-_
Index: iopen-2.4.21-chaos.patch
===================================================================
RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/iopen-2.4.21-chaos.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -b -B -p -r1.1 -r1.2
--- iopen-2.4.21-chaos.patch 19 Dec 2003 09:01:36 -0000 1.1
+++ iopen-2.4.21-chaos.patch 20 Feb 2004 20:32:21 -0000 1.2
@@ -74,7 +74,7 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/iopen.c 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.21-chaos/fs/ext3/iopen.c 2003-12-12 16:19:05.000000000 +0300
-@@ -0,0 +1,259 @@
+@@ -0,0 +1,258 @@
+/*
+ * linux/fs/ext3/iopen.c
+ *
@@ -159,6 +159,9 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+ return ERR_PTR(-ENOENT);
+ }
+
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++
+ /* preferrably return a connected dentry */
+ spin_lock(&dcache_lock);
+ list_for_each(lp, &inode->i_dentry) {
@@ -176,9 +179,14 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+ return alternate;
+ }
+ dentry->d_flags |= DCACHE_NFSD_DISCONNECTED;
++
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
+ spin_unlock(&dcache_lock);
+
-+ d_add(dentry, inode);
+ return NULL;
+}
+
@@ -203,6 +211,7 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+
+/* This function is spliced into ext3_lookup and does the move of a
+ * disconnected dentry (if it exists) to a connected dentry.
++ * Caller must hold dcache_lock.
+ */
+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode)
+{
@@ -210,13 +219,6 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+ struct list_head *lp;
+
+ /* preferrably return a connected dentry */
-+ spin_lock(&dcache_lock);
-+ /* verify this dentry is really new */
-+ assert(!de->d_inode);
-+ assert(list_empty(&de->d_subdirs));
-+ assert(list_empty(&de->d_alias));
-+
-+
+ list_for_each(lp, &inode->i_dentry) {
+ tmp = list_entry(lp, struct dentry, d_alias);
+ if (tmp->d_flags & DCACHE_NFSD_DISCONNECTED) {
@@ -228,10 +230,8 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+ }
+ }
+
-+ if (!goal) {
-+ spin_unlock(&dcache_lock);
++ if (!goal)
+ return NULL;
-+ }
+
+ /* Move the goal to the de hash queue - like d_move() */
+ goal->d_flags &= ~DCACHE_NFSD_DISCONNECTED;
@@ -250,7 +250,6 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+ list_add(&goal->d_child, &goal->d_parent->d_subdirs);
+ list_add(&de->d_child, &de->d_parent->d_subdirs);
+ __d_rehash(goal, 0);
-+ spin_unlock(&dcache_lock);
+
+ return goal;
+}
@@ -338,7 +337,7 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/iopen.h 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.21-chaos/fs/ext3/iopen.h 2003-12-12 16:19:05.000000000 +0300
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,15 @@
+/*
+ * iopen.h
+ *
@@ -352,6 +351,8 @@ Index: linux-2.4.21-chaos/fs/ext3/iopen.
+
+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
+extern int ext3_iopen_get_inode(struct inode *inode);
++extern struct dentry *iopen_connect_dentry(struct dentry *de,
++ struct inode *inode);
Index: linux-2.4.21-chaos/fs/ext3/namei.c
===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/namei.c 2003-12-12 16:18:59.000000000 +0300
@@ -365,14 +366,7 @@ Index: linux-2.4.21-chaos/fs/ext3/namei.
/*
* define how far ahead to read directories while searching them.
-@@ -922,16 +922,21 @@
- return NULL;
- }
- #endif
-+struct dentry *iopen_connect_dentry(struct dentry *de, struct inode *inode);
-
- static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry)
- {
+@@ -922,10 +922,14 @@
struct inode * inode;
struct ext3_dir_entry_2 * de;
struct buffer_head * bh;
@@ -387,31 +381,49 @@ Index: linux-2.4.21-chaos/fs/ext3/namei.
bh = ext3_find_entry(dentry, &de);
inode = NULL;
if (bh) {
-@@ -943,6 +948,12 @@
+@@ -943,7 +948,28 @@
return ERR_PTR(-EACCES);
}
}
+- d_add(dentry, inode);
++
++ /* verify this dentry is really new */
++ assert(!dentry->d_inode);
++ assert(list_empty(&dentry->d_alias)); /* d_instantiate */
++ assert(list_empty(&dentry->d_hash)); /* d_rehash */
++ assert(list_empty(&dentry->d_subdirs));
+
++ spin_lock(&dcache_lock);
+ if (inode && (alternate = iopen_connect_dentry(dentry, inode))) {
++ spin_unlock(&dcache_lock);
+ iput(inode);
+ return alternate;
+ }
+
- d_add(dentry, inode);
++ /* d_add(), but don't drop dcache_lock before adding dentry to inode */
++ if (inode) /* d_instantiate */
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++
++ __d_rehash(dentry, 0); /* d_rehash */
++ spin_unlock(&dcache_lock);
++
return NULL;
}
+
Index: linux-2.4.21-chaos/fs/ext3/super.c
===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/super.c 2003-12-12 16:18:51.000000000 +0300
+++ linux-2.4.21-chaos/fs/ext3/super.c 2003-12-12 16:19:05.000000000 +0300
-@@ -890,6 +890,17 @@
+@@ -890,6 +890,18 @@
|| !strcmp (this_char, "quota")
|| !strcmp (this_char, "usrquota"))
/* Don't do anything ;-) */ ;
+ else if (!strcmp (this_char, "iopen")) {
+ set_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+ } else if (!strcmp (this_char, "noiopen")) {
++ }
++ else if (!strcmp (this_char, "noiopen")) {
+ clear_opt (sbi->s_mount_opt, IOPEN);
+ clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
+ }
_______________________________________________
Lustre-cvs mailing list
Lustre-cvs@lists.clusterfs.com
https://lists.clusterfs.com/mailman/listinfo/lustre-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic