This is an interesting performance issue on a Samba ctdb cluster when Samba is configured to use vfs_fileid, /etc/mtab of the system is somewhat large and the workload is eg copying small files to the server. In strace I noticed a loop over the mtab for every file created, each iteration taking up to 500 ms due to calling stat+statfs on every mtab entry. Looks like the problem is that we're calling vfs_file_id_from_sbuf() in open_file_ntcreate() where smb_fname->st is still all zero for newly created files. Have WIP fix, need bugnumber.
Created attachment 15866 [details] Patch for 4.11 backported from master
Note that the fix is already in 4.12.
Comment on attachment 15866 [details] Patch for 4.11 backported from master LGTM.
Re-assigning to Karolin for inclusion in 4.11.next.
(In reply to Jeremy Allison from comment #4) Pushed to autobuild-v4-11-test.
(In reply to Karolin Seeger from comment #5) Pushed to v4-11-test. Closing out bug report. Thanks!