Bug 10916 - Big directories on 9p filesystem does not list all files
Big directories on 9p filesystem does not list all files
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
x64 Linux
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2014-11-03 01:54 UTC by Jim
Modified: 2014-11-03 22:01 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jim 2014-11-03 01:54:50 UTC
The following scenario seems to be working fine on a ext4 filesystem, but on a 9p file system the file listing is incomplete:

mkdir short && touch short/a{1..10000}.txt && ls short/ |wc -l

Windows lists 5417 items

Although a bit slow, SFTP and Apache seem to have no problem listing all the files, so I doubt it is a problem with the 9p setup.
Comment 1 Björn Jacke 2014-11-03 10:01:05 UTC
u selected win7 as OS in Bugzilla u probably don't have samba with a 9p filesystem on Windows 7, do you? Can you add detailled version and configuration information?
Comment 2 Jim 2014-11-03 10:17:30 UTC
On QEMU host:

# virsh edit ubuntu
    <filesystem type='mount' accessmode='mapped'>
      <source dir='/mnt/data/ubuntu'/>
      <target dir='data'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

# lsb_release -d
Description:    Ubuntu 14.04.1 LTS

# uname -a
Linux xxx.yyy.com 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

On QEMU client:

$ tail -n 2 /etc/fstab
data /mnt/data 9p trans=virtio,msize=262144,version=9p2000.L 0 0

$ uname -a
Linux ubuntu 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -d
Description:    Ubuntu 14.04.1 LTS

$ modinfo 9p
filename:       /lib/modules/3.13.0-35-generic/kernel/fs/9p/9p.ko
alias:          fs-9p
license:        GPL
author:         Ron Minnich <rminnich@lanl.gov>
author:         Eric Van Hensbergen <ericvh@gmail.com>
author:         Latchesar Ionkov <lucho@ionkov.net>
srcversion:     43E5149C5A086EA67E9D468
depends:        9pnet
intree:         Y
vermagic:       3.13.0-35-generic SMP mod_unload modversions
signer:         Magrathea: Glacier signing key
sig_key:        B1:41:4A:E9:6C:1B:0E:BB:7C:14:1F:A4:05:C1:F6:C9:8E:8A:66:F0
sig_hashalgo:   sha512

$ smbd --version
Version 4.1.6-Ubuntu
Comment 3 Jeremy Allison 2014-11-03 22:01:00 UTC
Samba does depend on some properties when enumerating directories. It expects the off_t values to be stable whilst a directory is open with opendir() across telldir/seekdir.

Just something to think about...