[linux-cifs-client] CIFS mounted share: scandir returns incomplete list

Sam Liddicott sam at liddicott.com
Tue Sep 2 11:39:16 GMT 2008


My work suggests no problem with the trans2 encoding or decoding but
that if the client is unable to accept all the entries from the server,
and yet also set the close-on-end_of_search flag, the last few entries
will be missing.

This occurred for me because the cifs proxy negotiated larger response
sizes with the server than the client did with the proxy.

I don't know if this can be related to your problem or not; is
close-on-eos set for the request?

Sam

* Hervé Fache wrote, On 01/09/08 08:43:
> In my case there are 677 files in the DOS file name format in that
> directory...
>
> Could you let me know how to log packets for this machine ('abrolhos')
> and protocol? I could leave the backup server logging all the time
> until the problem happens again and send you the relevant log when it
> does then...
>
> Also, isn't there a way maybe to send the number of entries as read on
> the CIFS server so we can at least detect the inconsistency? Or does
> it break the protocol?
>
> Hervé
>
> 2008/8/31 Sam Liddicott <sam at liddicott.com <mailto:sam at liddicott.com>>
>
>     I've noticed similar behavior on samba4 with vfs-cifs. By
>     modifying the request to reduce the number of entries that
>     find-first or find-next require I can make the problem "go away".
>
>     I think the problem is related to the encoding or decoding of
>     multi-part nttrans requests.
>
>     I believe that Stefan Metzemacher is aware of alignment issues in
>     the packing of large nttrans responses; your experience suggest a
>     problem also in unpacking large response.
>
>     I've been to busy to follow this up, having to make do with the
>     workaround I mention, but hope to spend time on it the latter part
>     of this week.
>
>     However if you bring it up on irc when I'm online (samjam) and
>     metze (I can't really speak for him) we may get somewhere. If you
>     have some packet dumps that can be put through wireshark it may help.
>
>     The problem occurs for me when there are more than a thousand
>     longish filenames in a directory.
>
>     sam
>
>     ------------------------------------------------------------------------
>     From: Hervé Fache <Herve at lucidia.net <mailto:Herve at lucidia.net>>
>     Sent: 31 August 2008 13:51
>     To: linux-cifs-client at lists.samba.org
>     <mailto:linux-cifs-client at lists.samba.org>
>     Subject: [linux-cifs-client] CIFS mounted share: scandir returns
>     incomplete list
>
>
>     Hello there,
>
>     I have a backup system on my Linux server which mounts shares to
>     back them up. To backup Windows shares, I use the CIFS mount type.
>
>     Every so often (hadn't happened in a few weeks until today),
>     scandir returns an incomplete list of contents, without any error
>     code being returned. Also, errno is not set. The problem happens
>     on a machine connected via WiFi (Intel 2200BG).
>
>     If you have any clues or if I can turn on some debug to track the
>     issue, please let me know.
>
>     Also, if you have ideas on how I could work around this issue, all
>     ideas are welcome!
>     Hervé
>
>

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list