From d68145a509b3e86e0d5ff44260f968eb1f39dfeb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Aug 2007 09:05:18 +0000 Subject: r24302: add a module that overloads the file_id_create VFS function and alters the device id depending on the configured algorithm. The algorithm is configured via "fileid:algorithm": - "fsname" (default) uses a uint64 hash over the mount point - "fsid" uses the fsid returned from statfs() This is needed for "clustering = yes" on some clusterfilesystems metze (This used to be commit 30f9171cca3e4f523cde7dfc96096c32e5af50be) --- source3/configure.in | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index d1ef464202..4029a0a10c 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -6236,6 +6236,38 @@ AC_ARG_WITH(python, esac ]) AC_SUBST(PYTHON) + +# Checks for the vfs_fileid module +# Start +AC_CHECK_FUNC(getmntent) + +AC_CHECK_HEADERS(sys/statfs.h) + +AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)]) +AC_CACHE_VAL(vfsfileid_cv_statfs,[ + AC_TRY_RUN([ + #include + #include + int main(void) + { + struct statfs fsd; + fsid_t fsid = fsd.f_fsid; + return statfs (".", &fsd); + }], + vfsfileid_cv_statfs=yes, + vfsfileid_cv_statfs=no, + vfsfileid_cv_statfs=cross) +]) +AC_MSG_RESULT($vfsfileid_cv_statfs) + +if test x"$ac_cv_func_getmntent" = x"yes" -a \ + x"$vfsfileid_cv_statfs" = x"yes"; then + default_shared_modules="$default_shared_modules vfs_fileid" +fi +# End +# Checks for the vfs_fileid module + + for i in `echo $default_static_modules | sed -e 's/,/ /g'` do eval MODULE_DEFAULT_$i=STATIC @@ -6356,6 +6388,7 @@ SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS) SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS) SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS) SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS) +SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS) SMB_SUBSYSTEM(VFS,smbd/vfs.o) -- cgit