This was found with gpfs, but it also applies to other setups. Given a setup with different file system mounts. /smbexport/fs1/ /smbexport/fs2/ and a SMB share exporting mount (//server/smbexport). A Windows client can map //server/smbexport/fs1 and //server/smbexport/fs2 to different drive letters. Querying available space on each of the mapped drives results in free space queries to the correct path. With 'dfree cache timeout' set, smbd caches the free space information per SMB share. That means that the first query (e.g. to //server/smbexport/fs1) returns the correct free space information, but a following query to the other path returns the wrong result (e.g. querying for //server/smbexport/fs2 will now return the available space for fs1 from the cache). To support this correctly, the solution would be to not cache on the SMB share level, but for the individual query.
Created attachment 14220 [details] patches for 4.8
Created attachment 14221 [details] patches for 4.7
Reassigning to Karolin for inclusion in 4.7.next, 4.8.next.
(In reply to Jeremy Allison from comment #3) Pushed to autobuild-v4-{8,7}-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!