[linux-cifs-client] Directory Listings Truncated

Mitch Crane mcrane1 at alltel.net
Thu Feb 12 16:27:26 GMT 2004


SuSE kernel 2.4.21

I have a problem mounting a share from an XP machine. There are over 100
items in the directory, but only the first 27 are showing up (including '.'
and '..'). If I do an 'ls' on the mount point, unmount it and then mount it
again everything works fine (as far as I can tell so far). (I'm not sure the
'ls' command is required, but once when it wasn't there I still got the
truncted directory listing.)

Looking at the Ethernet packets I see that I'm getting a
STATUS_OBJECT_NAME_INVALID error on the FIND_NEXT2 command. I also see the
the flag is set for strings are Unicode and that the filename being sent
telling the XP machine where to continue from is not Unicode which obviously
is the immediate cause of the error.

Another curiosity is that the filename my Linux box is asking the XP machine
to continue from is not the last filename sent by the XP machine in its
FIND_FIRST2 response. The XP machine responded with 44 directory entries,
but the Linux box is asking it to start from 28th rather than the 45th on
the subsequent FIND_NEXT2 command. Maybe this is caused by some kind of
confusion of the data length due to a Unicode/8-bit mismatch?

I also looked at the QUERY_PATH_INFO command and response which are the same
when it's working or the listings are truncated.

Since this problem persists until I umount and then mount the filesystem
again I thought maybe it was a problem with the initial contact from the
Linux box or the initial response from the XP box, but everything appears to
be the same.

Also, it doesn't matter whether I mount this share during the boot process
or from the prompt after the system is up and running.

I'm using mount.cifs 1.0.2b and the commandline is
mount.cifs //192.168.0.3/foo /mnt/bar -o ro,username=<user>,password=<pass>


-Mitch Crane




More information about the linux-cifs-client mailing list