[Samba] Missing Files/Missing Folders from an NFS Share

Jeremy Allison jra at samba.org
Fri Feb 17 03:40:10 UTC 2023


On Thu, Feb 16, 2023 at 05:41:54PM -0800, Jeremy Allison via samba wrote:
>On Fri, Feb 17, 2023 at 12:40:25AM +0100, Conor Armstrong wrote:
>>  Ok, starting to make sense now.  In order to fix it....
>>  I note that the lower level calls are wrapped in dir.c - eg
>>  dptr_SeekDir(...) wraps SeekDir(...)
>>  this might allow for some code to use array indexes instead of NFS cookies
>>  as noted by Chris Chilvers here for the 3.10 kernel:
>>  [1]https://lore.kernel.org/all/CAAmbk-e-YQAPo6QyNB0aJyc9qzUShmEC+x5eTR7wqp1ABWADsg@mail.gmail.com/T/
>
>First I think we need to understand how broken telldir()/seekdir()
>is over NFS in this case. Do they work at all ? An alternate fix
>would be to change Samba to store the previously read filename
>on the STATUS_MORE_ENTRIES case (we've run out of return space)
>and then when the enumeration starts again use that stored
>filename, rather than doing the SeekDir() to move back to
>the just read entry preparing for the next round.

It's possible we could actually hide this under a vfs_broken_nfs
VFS module, that implements this behavior without changing the
calling Samba code (i.e. if the seekdir() is seeking to the
offset we know is the previous value returned by the telldir()
of the last entry returned, then silently eat it and just
set up the readdir() call to return the cached value).

I haven't looked carefully yet, but this might be possible.



More information about the samba mailing list