Re: files disappearing from ls on NFS

From: John Baldwin <jhb_at_freebsd.org>
Date: Mon, 20 May 2013 14:22:49 -0400
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
Received on Mon May 20 2013 - 18:42:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:37 UTC