The branch, master has been updated via 2a65e8b Optimization on POSIX platforms that have fstatat. via da2cf8a Check for fstatat. from 7f760ed s4:samldb LDB module - MS-SAMR 3.1.1.8.10 "userAccountControl"
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 2a65e8befef004fd18d17853a1b72155752346c8 Author: Jeremy Allison <j...@samba.org> Date: Fri May 24 10:33:38 2013 -0700 Optimization on POSIX platforms that have fstatat. Tests show significant speedup in directory listings by using fstatat instead of a full pathname walk. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Mon Jun 10 20:14:12 CEST 2013 on sn-devel-104 commit da2cf8a947b5beda3e32cb5d9c5b0899a3bf5f61 Author: Jeremy Allison <j...@samba.org> Date: Fri Jun 7 17:53:45 2013 -0700 Check for fstatat. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/modules/vfs_default.c | 27 +++++++++++++++++++++++---- source3/wscript | 1 + 2 files changed, 24 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 8804e62..82d059c 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -376,11 +376,30 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle, START_PROFILE(syscall_readdir); result = readdir(dirp); - /* Default Posix readdir() does not give us stat info. - * Set to invalid to indicate we didn't return this info. */ - if (sbuf) - SET_STAT_INVALID(*sbuf); END_PROFILE(syscall_readdir); + if (sbuf) { + /* Default Posix readdir() does not give us stat info. + * Set to invalid to indicate we didn't return this info. */ + SET_STAT_INVALID(*sbuf); +#if defined(HAVE_DIRFD) && defined(HAVE_FSTATAT) + if (result != NULL) { + /* See if we can efficiently return this. */ + struct stat st; + int flags = (lp_posix_pathnames() ? + AT_SYMLINK_NOFOLLOW : 0); + int ret = fstatat(dirfd(dirp), + result->d_name, + &st, + flags); + if (ret == 0) { + init_stat_ex_from_stat(sbuf, + &st, + lp_fake_dir_create_times( + SNUM(handle->conn))); + } + } +#endif + } return result; } diff --git a/source3/wscript b/source3/wscript index 98a486f..b23608c 100644 --- a/source3/wscript +++ b/source3/wscript @@ -89,6 +89,7 @@ def configure(conf): conf.CHECK_FUNCS('fseeko setluid') conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h') conf.CHECK_FUNCS('fdopendir') + conf.CHECK_FUNCS('fstatat') conf.CHECK_FUNCS('getpwent_r setenv strcasecmp fcvt fcvtl') conf.CHECK_FUNCS('syslog vsyslog timegm setlocale') conf.CHECK_FUNCS_IN('nanosleep', 'rt') -- Samba Shared Repository