From owner-freebsd-current@FreeBSD.ORG Mon May 20 20:42:11 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7AE8D262; Mon, 20 May 2013 20:42:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4CA03184F; Mon, 20 May 2013 20:42:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DCC98B965; Mon, 20 May 2013 16:42:10 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: files disappearing from ls on NFS Date: Mon, 20 May 2013 14:22:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <1392815611.361000.1368569353890.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201305201422.49555.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 20 May 2013 16:42:11 -0400 (EDT) Cc: Hartmut Brandt , Rick Macklem , kib@freebsd.org, 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: Mon, 20 May 2013 20:42:11 -0000 On Wednesday, May 15, 2013 4:38:38 am Hartmut Brandt wrote: > On Wed, 15 May 2013, Rick Macklem wrote: > > RM>Well, getdents() basically just calls kern_getdirentries() and it calls > RM>VOP_READDIR() { which is called nfs_readdir() in the NFS clients }. > RM>nfs_readdir() calls ncl_bioread() to do the real work of finding the > RM>buffer cache blocks and copying the data out of them. > RM>One thing you might check via printf()s is whether the buffer cache > RM>has the zero'd data in it before it copies it to userland. > > I now dump the data just before the call to vn_io_fault_iomove in > ncl_bioread(). So what I do: > > 1. reboot > 2. login > 3. ls > -> I see that it is moving 4 blocks 4k each to the user and they look > fine > 4. wait half an hour > 5. ls > -> now there is only one block, which contains zeros starting from > 0x200. > > Note that I don't do anything else on that machine during that time. To be clear, you are still seeing zero'd data in your printfs? Also, it seems like it is passing the wrong size now? Can you output the various size fields (b_resid, n, n_direofoffset, uio_offset, and uio_resid)? -- John Baldwin