From owner-freebsd-current@FreeBSD.ORG Sun May 5 12:19:45 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 450A99FD for ; Sun, 5 May 2013 12:19:45 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.33]) by mx1.freebsd.org (Postfix) with ESMTP id A7E60B7E for ; Sun, 5 May 2013 12:19:44 +0000 (UTC) Received: from DLREXHUB02.intra.dlr.de (172.21.152.140) by dlrexedge02.dlr.de (172.21.163.101) with Microsoft SMTP Server (TLS) id 14.2.328.9; Sun, 5 May 2013 14:19:15 +0200 Received: from DLREXMBX01.intra.dlr.de ([fe80::d198:77e5:d411:fccd]) by dlrexhub02.intra.dlr.de ([::1]) with mapi id 14.02.0328.009; Sun, 5 May 2013 14:19:15 +0200 From: To: Subject: RE: files disappearing from ls on NFS Thread-Topic: files disappearing from ls on NFS Thread-Index: AQHOSEJ55WK7YzwjmU2to6AlGcncLZj1My+AgABOCACAAQOYxA== Date: Sun, 5 May 2013 12:19:14 +0000 Message-ID: <611243783F62AF48AFB07BC25FA4B1061C54CFA3@DLREXMBX01.intra.dlr.de> References: , <347158778.122924.1367707768693.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <347158778.122924.1367707768693.JavaMail.root@erie.cs.uoguelph.ca> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [129.247.12.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 May 2013 12:19:45 -0000 Looks like the problem is in the new NFS code - the old code does the right= thing. I've still to try your patch...=0A= =0A= harti=0A= ________________________________________=0A= From: Rick Macklem [rmacklem@uoguelph.ca]=0A= Sent: Sunday, May 05, 2013 12:49 AM=0A= To: Brandt, Hartmut=0A= Cc: current@freebsd.org=0A= Subject: Re: files disappearing from ls on NFS=0A= =0A= Hartmut Brandt wrote:=0A= > On Fri, 3 May 2013, Rick Macklem wrote:=0A= >=0A= > RM>Ok, if you succeed in isolating the commit, that would be great.=0A= >=0A= > Hmm. I'm somewhat stuck. clang from yesterday can't compile clang from=0A= > a=0A= > month ago...=0A= >=0A= > harti=0A= >=0A= Oh, and one other thing you can try is switching to the old client=0A= "mount -t oldnfs ...".=0A= =0A= rick=0A= =0A= > RM>=0A= > RM>rick=0A= > RM>=0A= > RM>> harti=0A= > RM>>=0A= > RM>> On Fri, 3 May 2013, Rick Macklem wrote:=0A= > RM>>=0A= > RM>> RM>Hartmut Brandt wrote:=0A= > RM>> RM>> Hi,=0A= > RM>> RM>>=0A= > RM>> RM>> I've updated one of my -current machines this week (previous=0A= > RM>> update=0A= > RM>> RM>> was in=0A= > RM>> RM>> february). Now I see a strange effect (it seems only on NFS=0A= > RM>> mounts):=0A= > RM>> RM>> ls or=0A= > RM>> RM>> even echo * will list only some files (strange enough the=0A= > first=0A= > RM>> files=0A= > RM>> RM>> from=0A= > RM>> RM>> the normal, alphabetically ordered list). If I change=0A= > something=0A= > RM>> in the=0A= > RM>> RM>> directory (delete a file or create a new one) for some time=0A= > the=0A= > RM>> RM>> complete=0A= > RM>> RM>> listing will appear but after sime time (seconds to a minute=0A= > or=0A= > RM>> so)=0A= > RM>> RM>> again=0A= > RM>> RM>> only part of the files is listed.=0A= > RM>> RM>>=0A= > RM>> RM>> A ktrace on ls /usr/src/lib/libc/gen shows that=0A= > getdirentries is=0A= > RM>> RM>> called=0A= > RM>> RM>> only once (returning 4096). For a full listing getdirentries=0A= > is=0A= > RM>> called=0A= > RM>> RM>> 5=0A= > RM>> RM>> times with the last returning 0.=0A= > RM>> RM>>=0A= > RM>> RM>> I can still open files that are not listed if I know their=0A= > name,=0A= > RM>> RM>> though.=0A= > RM>> RM>>=0A= > RM>> RM>> The NFS server is a Windows 2008 server with an OpenText NFS=0A= > RM>> Server=0A= > RM>> RM>> which=0A= > RM>> RM>> works without problems to all the other FreeBSD machines.=0A= > RM>> RM>>=0A= > RM>> RM>> So what could that be?=0A= > RM>> RM>>=0A= > RM>> RM>Someone else reported missing files returned via "ls"=0A= > recently,=0A= > RM>> when=0A= > RM>> RM>they used a small readdirsize (below 8K). I haven't yet had a=0A= > RM>> change to try=0A= > RM>> RM>and reproduce it or do any snooping around.=0A= > RM>> RM>=0A= > RM>> RM>There haven't been any recent changes to readdir in the NFS=0A= > client,=0A= > RM>> RM>except a trivial one that adds a check for vnode type being=0A= > VDIR,=0A= > RM>> RM>so I don't see that it can be a recent NFS change.=0A= > RM>> RM>=0A= > RM>> RM>If you can increase the readdirsize, try that to see if it=0A= > avoids=0A= > RM>> RM>the problem. "nfsstat -m" shows you what the mount options end=0A= > up=0A= > RM>> RM>being after doing the mount. The server might be limiting the=0A= > RM>> readdirsize=0A= > RM>> RM>to 4K, so you should check, even if you specify a large value=0A= > for=0A= > RM>> RM>the mount.=0A= > RM>> RM>=0A= > RM>> RM>rick=0A= > RM>> RM>=0A= > RM>> RM>> Regards,=0A= > RM>> RM>> harti=0A= > RM>> RM>> _______________________________________________=0A= > RM>> RM>> freebsd-current@freebsd.org mailing list=0A= > RM>> RM>> http://lists.freebsd.org/mailman/listinfo/freebsd-current=0A= > RM>> RM>> To unsubscribe, send any mail to=0A= > RM>> RM>> "freebsd-current-unsubscribe@freebsd.org"=0A= > RM>> RM>=0A= > RM>> _______________________________________________=0A= > RM>> freebsd-current@freebsd.org mailing list=0A= > RM>> http://lists.freebsd.org/mailman/listinfo/freebsd-current=0A= > RM>> To unsubscribe, send any mail to=0A= > RM>> "freebsd-current-unsubscribe@freebsd.org"=0A= > RM>=0A= > _______________________________________________=0A= > freebsd-current@freebsd.org mailing list=0A= > http://lists.freebsd.org/mailman/listinfo/freebsd-current=0A= > To unsubscribe, send any mail to=0A= > "freebsd-current-unsubscribe@freebsd.org"=0A=