rpms/kernel/FC-4 linux-2.6-nfs-enoent.patch, NONE, 1.1 kernel-2.6.spec, 1.1403, 1.1404

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Aug 3 21:28:54 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv30626

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-nfs-enoent.patch 
Log Message:
nfs server intermitently claimed ENOENT on existing files or directories. (#150759)



linux-2.6-nfs-enoent.patch:
 namei.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-nfs-enoent.patch ---
The 2.6.10 ext3_get_parent attempts to use ext3_find_entry to look up the
entry "..", which fails for dx directories since ".." is not present in
the directory hash table. 

cf  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=150759
and https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144556

ext3_get_parent() is IMHO the wrong place to fix this bug as it introduces
a lot of internals from htree into that function.  Instead, I think this
should be fixed in ext3_find_entry() as in the below patch.  This has the
added advantage that it works for any callers of ext3_find_entry() and not
just ext3_lookup_parent().

I thought I submitted this patch to l-k at one point, but now I can't find
any mention of that in the archives...

Signed-off-by: Andreas Dilger <adilger at clusterfs.com>
Signed-off-by: Stephen Tweedie <sct at redhat.com>

--- linux-2.6.9/fs/ext3/namei.c.=K0000=.orig
+++ linux-2.6.9/fs/ext3/namei.c
@@ -927,8 +927,16 @@ static struct buffer_head * ext3_dx_find
 	struct inode *dir = dentry->d_parent->d_inode;
 
 	sb = dir->i_sb;
-	if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err)))
-		return NULL;
+	/* NFS may look up ".." - look at dx_root directory block */
+	if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){
+		if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err)))
+			return NULL;
+	} else {
+		frame = frames;
+		frame->bh = NULL;			/* for dx_release() */
+		frame->at = (struct dx_entry *)frames;	/* hack for zero entry*/
+		dx_set_block(frame->at, 0);		/* dx_root block is 0 */
+	}
 	hash = hinfo.hash;
 	do {
 		block = dx_get_block(frame->at);


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1403
retrieving revision 1.1404
diff -u -r1.1403 -r1.1404
--- kernel-2.6.spec	3 Aug 2005 21:24:31 -0000	1.1403
+++ kernel-2.6.spec	3 Aug 2005 21:28:49 -0000	1.1404
@@ -303,6 +303,7 @@
 Patch1202: linux-2.6.9-lockd-block-nosleep.patch
 Patch1203: linux-2.6.9-lockd-reclaims.patch
 Patch1204: linux-2.6.12-nfsd-ctlbits.patch
+Patch1205: linux-2.6-nfs-enoent.patch
 
 # NIC driver updates
 Patch1300: linux-2.6.9-net-tr-irqlock-fix.patch
@@ -725,6 +726,7 @@
 %patch1202 -p1
 %patch1203 -p1
 %patch1204 -p1
+%patch1205 -p1
 
 # NIC driver fixes.
 # Use correct spinlock functions in token ring net code
@@ -1273,6 +1275,7 @@
 * Wed Aug  3 2005 Dave Jones <davej at redhat.com>
 - Include pre-release 2.6.12.4 patchset
 - Silence some messages from PowerMac thermal driver. (#158739)
+- nfs server intermitently claimed ENOENT on existing files or directories. (#150759)
 
 * Fri Jul 29 2005 Dave Jones <davej at redhat.com>
 - Include backport of 2.6.13rc4 ACPI (acpi-20050708-2.6.12.patch)




More information about the fedora-cvs-commits mailing list