Subject: Re: Problem with Linux emulation?
To: Matthias Scheler <tron@zhadum.de>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: current-users
Date: 05/13/2002 22:44:10
--ELM724308713-1125-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII

Matthias Scheler wrote:
> I think the problem can also reproduced on a local directory if it is
> large enough that multiple calls to getdents64() are required. It only
> happens very easily on NFS mounts because directories have a blocksize
> of 512 byte there.

I'm not able to reproduce the problem with local dir. Can you
try if the appended patch helps you with the local dir problem?

Jaromir

> 
> 	Kind regards
> 
> -- 
> Matthias Scheler                                  http://scheler.de/~matthias/
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-

--ELM724308713-1125-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-2
Content-Disposition: attachment; filename=f64.diff

Index: linux_file64.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/common/linux_file64.c,v
retrieving revision 1.15
diff -u -p -r1.15 linux_file64.c
--- linux_file64.c	2002/05/13 05:41:27	1.15
+++ linux_file64.c	2002/05/13 20:36:11
@@ -456,6 +456,7 @@ again:
 			outp++;
 			break;
 		}
+		off = *cookie++;	/* each entry points to next */
 		/*
 		 * Massage in place to make a Linux-shaped dirent (otherwise
 		 * we have to worry about touching user memory outside of
@@ -478,7 +479,6 @@ again:
 			goto out;
 		/* advance past this real entry */
 		inp += reclen;
-		off = *cookie++;	/* each entry points to itself */
 		/* advance output past Linux-shaped entry */
 		outp += linux_reclen;
 		resid -= linux_reclen;

--ELM724308713-1125-0_--