From: Amos Jeffries Date: Tue, 21 Jul 2015 13:50:24 +0000 (-0700) Subject: Revert rev.14165 and rev.14167 X-Git-Tag: merge-candidate-3-v1~38^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d21abf80b3e721ffbe3ac15a5f8686ae196b73df;p=thirdparty%2Fsquid.git Revert rev.14165 and rev.14167 Too much instability added to trunk by these. DiskIO needs a full refactoring and more testing before its ready to merge. We will have to live with libIpcIo problems until then. --- diff --git a/configure.ac b/configure.ac index 9ba9d93fe0..290b6087a8 100644 --- a/configure.ac +++ b/configure.ac @@ -520,6 +520,8 @@ SQUID_DEFINE_BOOL(USE_DISKIO,$squid_opt_enable_diskio, dnl Some autoconf.h defines we might enable later... AC_ARG_WITH(pthreads,AS_HELP_STRING([--without-pthreads],[Disable POSIX Threads])) AC_ARG_WITH(aio, AS_HELP_STRING([--without-aio],[Do not use POSIX AIO. Default: auto-detect])) +AH_TEMPLATE(USE_DISKIO_AIO, [Whether POSIX AIO support is needed. Automatic]) +AH_TEMPLATE(USE_DISKIO_DISKTHREADS, [Whether pthreads support is needed. Automatic]) ENABLE_WIN32_AIOPS=0 squid_opt_use_aio= squid_opt_use_diskthreads= @@ -527,13 +529,9 @@ AIOLIB= dnl Setup the module paths etc. DISK_LIBS= +DISK_OS_LIBS= DISK_MODULES= DISK_LINKOBJS= -AH_TEMPLATE(HAVE_DISKIO_MODULE_AIO, [Whether POSIX AIO Disk I/O module is built]) -AH_TEMPLATE(HAVE_DISKIO_MODULE_BLOCKING, [Whether Blocking Disk I/O module is built]) -AH_TEMPLATE(HAVE_DISKIO_MODULE_DISKDAEMON, [Whether DiskDaemon Disk I/O module is built]) -AH_TEMPLATE(HAVE_DISKIO_MODULE_IPCIO, [Whether IpcIo Disk I/O module is built]) -AH_TEMPLATE(HAVE_DISKIO_MODULE_MMAPPED, [Whether Mmapped Disk I/O module is built]) for module in $squid_disk_module_candidates none; do # maybe not needed if test "x$module" = "xnone"; then @@ -543,65 +541,6 @@ for module in $squid_disk_module_candidates none; do AC_MSG_ERROR(disk-io $module does not exist) fi case "$module" in - - AIO) - dnl Check for POSIX AIO availability - squid_opt_use_aio="yes" - AIOLIB= - if test "x$with_aio" != "xno"; then - have_aio_header=no - AC_CHECK_HEADERS(aio.h,[have_aio_header=yes]) - dnl On some systems POSIX AIO functions are in librt - dnl On some systems POSIX AIO functions are in libaio - AC_CHECK_LIB(rt,aio_read,[AIOLIB="-lrt"],AC_CHECK_LIB(aio,aio_read,[AIOLIB="-laio"],[])) - dnl Enable AIO if the library and headers are found - if test "x$AIOLIB" != "x" && test "x$have_aio_header" = "xyes"; then - AC_MSG_NOTICE([Native POSIX AIO support detected.]) - squid_opt_use_aio="yes" - else - dnl Windows does things differently. We provide wrappers. - dnl TODO: Windows really needs its own DiskIO module or its Overlaped IO - case "$squid_host_os" in - mingw) - squid_opt_use_aio="yes" - AC_MSG_NOTICE([Windows being built. Maybe-enable POSIX AIO.]) - ;; - *) - AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.]) - squid_opt_use_aio="no" - ;; - esac - fi - else - AC_MSG_NOTICE([POSIX AIO support manually disabled.]) - squid_opt_use_aio="no" - fi - dnl Use the POSIX AIO pieces if we actually need them. - if test "x$squid_opt_use_aio" = "xyes" ; then - DISK_MODULES="$DISK_MODULES AIO" - DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/AIO/AIODiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_AIO],1,[POSIX AIO Disk I/O module is built]) - case "$squid_host_os" in - mingw) - ENABLE_WIN32_AIO=1 - AC_MSG_NOTICE([Replacing AIO DiskIO module with: Windows overlapped I/O support]) - ;; - *) - AC_MSG_NOTICE([Enabling AIO DiskIO module]) - ;; - esac - else - AC_MSG_NOTICE([AIO DiskIO Module disabled. Missing POSIX AIO support.]) - fi - ;; - - Blocking) - AC_MSG_NOTICE([Enabling Blocking DiskIO module]) - DISK_MODULES="$DISK_MODULES Blocking" - DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/Blocking/BlockingDiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_BLOCKING],1,[Blocking Disk I/O module is built]) - ;; - DiskDaemon) case "$squid_host_os" in mingw) @@ -609,13 +548,13 @@ for module in $squid_disk_module_candidates none; do ;; *) AC_MSG_NOTICE([Enabling DiskDaemon DiskIO module]) + DISK_LIBS="$DISK_LIBS libDiskDaemon.a" DISK_MODULES="$DISK_MODULES DiskDaemon" + DISK_PROGRAMS="$DISK_PROGRAMS DiskIO/DiskDaemon/diskd" DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskDaemon/DiskDaemonDiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_DISKDAEMON],1,[DiskDaemon Disk I/O module is built]) ;; esac ;; - DiskThreads) squid_opt_use_diskthreads="yes" LIBPTHREADS= @@ -685,24 +624,71 @@ for module in $squid_disk_module_candidates none; do squid_opt_use_diskthreads="no" fi if test "x$squid_opt_use_diskthreads" = "xyes" ; then + AC_DEFINE(USE_DISKIO_DISKTHREADS, 1, [Whether pthreads support is needed. Automatic]) AC_MSG_NOTICE([Enabling DiskThreads DiskIO module]) + DISK_LIBS="$DISK_LIBS libDiskThreads.a" + DISK_OS_LIBS="$DISK_OS_LIBS $LIBPTHREADS" DISK_MODULES="$DISK_MODULES DiskThreads" DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskThreads/DiskThreadsDiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_DISKTHREADS],1,[DiskThreads Disk I/O module is built]) else + AC_DEFINE(USE_DISKIO_DISKTHREADS, 0, [Whether pthreads support is needed. Automatic]) AC_MSG_NOTICE([Native pthreads support disabled. DiskThreads module automaticaly disabled.]) SQUID_STATE_ROLLBACK([diskthreads_state]) fi ;; - IpcIo) - AC_MSG_NOTICE([Enabling IpcIo DiskIO module]) - if test "x$ac_cv_search_shm_open" = "xno" ; then - AC_MSG_ERROR([DiskIO IpcIo module requires shared memory support]) + AIO) + dnl Check for POSIX AIO availability + squid_opt_use_aio="yes" + AIOLIB= + if test "x$with_aio" != "xno"; then + have_aio_header=no + AC_CHECK_HEADERS(aio.h,[have_aio_header=yes]) + dnl On some systems POSIX AIO functions are in librt + dnl On some systems POSIX AIO functions are in libaio + AC_CHECK_LIB(rt,aio_read,[AIOLIB="-lrt"],AC_CHECK_LIB(aio,aio_read,[AIOLIB="-laio"],[])) + dnl Enable AIO if the library and headers are found + if test "x$AIOLIB" != "x" && test "x$have_aio_header" = "xyes"; then + AC_MSG_NOTICE([Native POSIX AIO support detected.]) + squid_opt_use_aio="yes" + else + dnl Windows does things differently. We provide wrappers. + dnl TODO: Windows really needs its own DiskIO module or its Overlaped IO + case "$squid_host_os" in + mingw) + squid_opt_use_aio="yes" + AC_MSG_NOTICE([Windows being built. Maybe-enable POSIX AIO.]) + ;; + *) + AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.]) + squid_opt_use_aio="no" + ;; + esac + fi + else + AC_MSG_NOTICE([POSIX AIO support manually disabled.]) + squid_opt_use_aio="no" + fi + dnl Use the POSIX AIO pieces if we actually need them. + if test "x$squid_opt_use_aio" = "xyes" ; then + AC_DEFINE(USE_DISKIO_AIO, 1, [Whether POSIX AIO support is needed. Automatic]) + DISK_MODULES="$DISK_MODULES AIO" + DISK_LIBS="$DISK_LIBS libAIO.a" + DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/AIO/AIODiskIOModule.o" + case "$squid_host_os" in + mingw) + ENABLE_WIN32_AIO=1 + AC_MSG_NOTICE([Replacing AIO DiskIO module with: Windows overlapped I/O support]) + ;; + *) + AC_MSG_NOTICE([Enabling AIO DiskIO module]) + DISK_OS_LIBS="$DISK_OS_LIBS $AIOLIB" + ;; + esac + else + AC_DEFINE(USE_DISKIO_AIO, 0, [Whether POSIX AIO support is needed. Automatic]) + AC_MSG_NOTICE([AIO DiskIO Module disabled. Missing POSIX AIO support.]) fi - DISK_MODULES="$DISK_MODULES IpcIo" - DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/IpcIo/IpcIoDiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_IPCIO],1,[IpcIo Disk I/O module is built]) ;; Mmapped) @@ -712,15 +698,33 @@ for module in $squid_disk_module_candidates none; do AC_MSG_NOTICE([Mmapped DiskIO is not available on Mingw]) else AC_MSG_NOTICE([Enabling Mmapped DiskIO module]) + DISK_LIBS="$DISK_LIBS libMmapped.a" DISK_MODULES="$DISK_MODULES Mmapped" DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/Mmapped/MmappedDiskIOModule.o" - AC_DEFINE([HAVE_DISKIO_MODULE_MMAPPED],1,[Mmapped Disk I/O module is built]) fi ;; + IpcIo) + AC_MSG_NOTICE([Enabling IpcIo DiskIO module]) + if test "x$ac_cv_search_shm_open" = "xno" ; then + AC_MSG_ERROR([DiskIO IpcIo module requires shared memory support]) + fi + DISK_LIBS="$DISK_LIBS libIpcIo.a" + DISK_MODULES="$DISK_MODULES IpcIo" + DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/IpcIo/IpcIoDiskIOModule.o" + AC_DEFINE(USE_DISKIO_IPCIO, 1, [Enable DiskIO IpcIo module.]) + ;; + + Blocking) + AC_MSG_NOTICE([Enabling Blocking DiskIO module]) + DISK_LIBS="$DISK_LIBS libBlocking.a" + DISK_MODULES="$DISK_MODULES Blocking" + DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/Blocking/BlockingDiskIOModule.o" + ;; + *) AC_MSG_NOTICE([Enabling $module DiskIO module]) - DISK_LIBS="$DISK_LIBS lib${module}.la" + DISK_LIBS="$DISK_LIBS lib${module}.a" DISK_MODULES="$DISK_MODULES ${module}" DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/${module}/${module}DiskIOModule.o" ;; @@ -729,17 +733,11 @@ done AC_MSG_NOTICE([IO Modules built: $DISK_MODULES]) AC_SUBST(DISK_MODULES) AC_SUBST(DISK_LIBS) +AC_SUBST(DISK_PROGRAMS) AC_SUBST(DISK_LINKOBJS) -AM_CONDITIONAL([ENABLE_DISKIO_AIO], [test "x$squid_disk_module_candidates_AIO" != "xno"]) -AC_SUBST(AIOLIB) -AM_CONDITIONAL([ENABLE_WIN32_AIO], [test "x$squid_disk_module_candidates_AIO" != "xno" -a "x$ENABLE_WIN32_AIO" = "x1"]) -AM_CONDITIONAL([ENABLE_DISKIO_BLOCKING], [test "x$squid_disk_module_candidates_Blocking" != "xno"]) -AM_CONDITIONAL([ENABLE_DISKIO_DISKDAEMON], [test "x$squid_disk_module_candidates_DiskDaemon" != "xno"]) -AM_CONDITIONAL([ENABLE_DISKIO_DISKTHREADS], [test "x$squid_disk_module_candidates_DiskThreads" != "xno"]) -AC_SUBST(LIBPTHREADS) -AM_CONDITIONAL([ENABLE_WIN32_AIOPS], [test "x$squid_disk_module_candidates_DiskThreads" != "xno" -a "x$ENABLE_WIN32_AIOPS" = "x1"]) -AM_CONDITIONAL([ENABLE_DISKIO_IPCIO], [test "x$squid_disk_module_candidates_IpcIo" != "xno"]) -AM_CONDITIONAL([ENABLE_DISKIO_MMAPPED], [test "x$squid_disk_module_candidates_Mmapped" != "xno"]) +AC_SUBST(DISK_OS_LIBS) +AM_CONDITIONAL([ENABLE_WIN32_AIOPS], [test "$ENABLE_WIN32_AIOPS" = "1"]) +AM_CONDITIONAL([ENABLE_WIN32_AIO], [test "$ENABLE_WIN32_AIO" = "1"]) dnl Check what Storage formats are wanted. @@ -3849,13 +3847,6 @@ AC_CONFIG_FILES([ src/clients/Makefile src/comm/Makefile src/dns/Makefile - src/DiskIO/Makefile - src/DiskIO/AIO/Makefile - src/DiskIO/Blocking/Makefile - src/DiskIO/DiskDaemon/Makefile - src/DiskIO/DiskThreads/Makefile - src/DiskIO/IpcIo/Makefile - src/DiskIO/Mmapped/Makefile src/esi/Makefile src/eui/Makefile src/format/Makefile diff --git a/src/DiskIO/AIO/AIODiskFile.cc b/src/DiskIO/AIO/AIODiskFile.cc index ca6cad7c7b..a946e3a578 100644 --- a/src/DiskIO/AIO/AIODiskFile.cc +++ b/src/DiskIO/AIO/AIODiskFile.cc @@ -21,10 +21,9 @@ */ #include "squid.h" -#include "Debug.h" +#include "AIODiskFile.h" +#include "AIODiskIOStrategy.h" #include "disk.h" -#include "DiskIO/AIO/AIODiskFile.h" -#include "DiskIO/AIO/AIODiskIOStrategy.h" #include "DiskIO/IORequestor.h" #include "DiskIO/ReadRequest.h" #include "DiskIO/WriteRequest.h" diff --git a/src/DiskIO/AIO/AIODiskFile.h b/src/DiskIO/AIO/AIODiskFile.h index 050eaf1535..926741355a 100644 --- a/src/DiskIO/AIO/AIODiskFile.h +++ b/src/DiskIO/AIO/AIODiskFile.h @@ -9,10 +9,10 @@ #ifndef SQUID_AIODISKFILE_H #define SQUID_AIODISKFILE_H -#if HAVE_DISKIO_MODULE_AIO +#if USE_DISKIO_AIO +#include "async_io.h" #include "cbdata.h" -#include "DiskIO/AIO/async_io.h" #include "DiskIO/DiskFile.h" #include "SquidString.h" @@ -56,6 +56,6 @@ private: bool error_; }; -#endif /* HAVE_DISKIO_MODULE_AIO */ +#endif /* USE_DISKIO_AIO */ #endif /* SQUID_AIODISKFILE_H */ diff --git a/src/DiskIO/AIO/AIODiskIOModule.cc b/src/DiskIO/AIO/AIODiskIOModule.cc index 039c7d3b76..2fc560e2d8 100644 --- a/src/DiskIO/AIO/AIODiskIOModule.cc +++ b/src/DiskIO/AIO/AIODiskIOModule.cc @@ -7,8 +7,8 @@ */ #include "squid.h" -#include "DiskIO/AIO/AIODiskIOModule.h" -#include "DiskIO/AIO/AIODiskIOStrategy.h" +#include "AIODiskIOModule.h" +#include "AIODiskIOStrategy.h" #include "Store.h" AIODiskIOModule::AIODiskIOModule() diff --git a/src/DiskIO/AIO/AIODiskIOModule.h b/src/DiskIO/AIO/AIODiskIOModule.h index 0988c932ca..de665ed41e 100644 --- a/src/DiskIO/AIO/AIODiskIOModule.h +++ b/src/DiskIO/AIO/AIODiskIOModule.h @@ -9,7 +9,7 @@ #ifndef SQUID_AIODISKIOMODULE_H #define SQUID_AIODISKIOMODULE_H -#if HAVE_DISKIO_MODULE_AIO +#if USE_DISKIO_AIO #include "DiskIO/DiskIOModule.h" @@ -28,6 +28,6 @@ private: static AIODiskIOModule Instance; }; -#endif /* HAVE_DISKIO_MODULE_AIO */ +#endif /* USE_DISKIO_AIO */ #endif /* SQUID_AIODISKIOMODULE_H */ diff --git a/src/DiskIO/AIO/AIODiskIOStrategy.cc b/src/DiskIO/AIO/AIODiskIOStrategy.cc index 870a00ac38..d699f9b4d2 100644 --- a/src/DiskIO/AIO/AIODiskIOStrategy.cc +++ b/src/DiskIO/AIO/AIODiskIOStrategy.cc @@ -19,8 +19,8 @@ */ #include "squid.h" -#include "DiskIO/AIO/AIODiskFile.h" -#include "DiskIO/AIO/AIODiskIOStrategy.h" +#include "AIODiskFile.h" +#include "AIODiskIOStrategy.h" #include "DiskIO/IORequestor.h" #include "DiskIO/ReadRequest.h" #include "DiskIO/WriteRequest.h" diff --git a/src/DiskIO/AIO/AIODiskIOStrategy.h b/src/DiskIO/AIO/AIODiskIOStrategy.h index d58e9fc62f..eac4651826 100644 --- a/src/DiskIO/AIO/AIODiskIOStrategy.h +++ b/src/DiskIO/AIO/AIODiskIOStrategy.h @@ -6,12 +6,12 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -#ifndef SQUID_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H -#define SQUID_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H +#ifndef SQUID_AIODISKIOSTRATEGY_H +#define SQUID_AIODISKIOSTRATEGY_H -#if HAVE_DISKIO_MODULE_AIO +#if USE_DISKIO_AIO -#include "DiskIO/AIO/async_io.h" +#include "async_io.h" #include "DiskIO/DiskIOStrategy.h" class AIODiskIOStrategy : public DiskIOStrategy @@ -51,6 +51,6 @@ public: int findSlot(); }; -#endif /* HAVE_DISKIO_MODULE_AIO */ -#endif /* SQUID_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H */ +#endif /* USE_DISKIO_AIO */ +#endif /* SQUID_AIODISKIOSTRATEGY_H */ diff --git a/src/DiskIO/AIO/Makefile.am b/src/DiskIO/AIO/Makefile.am deleted file mode 100644 index 46c283a9c5..0000000000 --- a/src/DiskIO/AIO/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libAIO.la - -libAIO_la_SOURCES = \ - async_io.h \ - AIODiskFile.cc \ - AIODiskFile.h \ - AIODiskIOModule.cc \ - AIODiskIOModule.h \ - AIODiskIOStrategy.cc \ - AIODiskIOStrategy.h - -if ENABLE_WIN32_AIO -libAIO_la_SOURCES += \ - aio_win32.cc \ - aio_win32.h -else -EXTRA_DIST = \ - aio_win32.cc \ - aio_win32.h -endif - diff --git a/src/DiskIO/AIO/aio_win32.h b/src/DiskIO/AIO/aio_win32.h index 2e83455747..41d48fdf4b 100644 --- a/src/DiskIO/AIO/aio_win32.h +++ b/src/DiskIO/AIO/aio_win32.h @@ -9,7 +9,7 @@ #ifndef __WIN32_AIO_H__ #define __WIN32_AIO_H__ -#if HAVE_DISKIO_MODULE_AIO +#if USE_DISKIO_AIO #ifndef off64_t typedef int64_t off64_t; @@ -78,6 +78,6 @@ int aio_open(const char *, int); void aio_close(int); #endif /* _SQUID_WINDOWS_ */ -#endif /* HAVE_DISKIO_MODULE_AIO */ +#endif /* USE_DISKIO_AIO */ #endif /* __WIN32_AIO_H__ */ diff --git a/src/DiskIO/AIO/async_io.h b/src/DiskIO/AIO/async_io.h index 3428c449b4..0a7cb7f8d3 100644 --- a/src/DiskIO/AIO/async_io.h +++ b/src/DiskIO/AIO/async_io.h @@ -9,10 +9,10 @@ #ifndef __ASYNC_IO_H__ #define __ASYNC_IO_H__ -#if HAVE_DISKIO_MODULE_AIO +#if USE_DISKIO_AIO #if _SQUID_WINDOWS_ -#include "DiskIO/AIO/aio_win32.h" +#include "aio_win32.h" #else #if HAVE_AIO_H #include @@ -73,6 +73,6 @@ struct _async_queue { int aq_numpending; /* Num of pending ops */ }; -#endif /* HAVE_DISKIO_MODULE_AIO */ +#endif /* USE_DISKIO_AIO */ #endif /* __ASYNC_IO_H_ */ diff --git a/src/DiskIO/Blocking/Makefile.am b/src/DiskIO/Blocking/Makefile.am deleted file mode 100644 index 64aaee003c..0000000000 --- a/src/DiskIO/Blocking/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libBlocking.la - -libBlocking_la_SOURCES = \ - BlockingDiskIOModule.cc \ - BlockingDiskIOModule.h \ - BlockingFile.cc \ - BlockingFile.h \ - BlockingIOStrategy.cc \ - BlockingIOStrategy.h diff --git a/src/DiskIO/DiskDaemon/Makefile.am b/src/DiskIO/DiskDaemon/Makefile.am deleted file mode 100644 index 24a25d5a6c..0000000000 --- a/src/DiskIO/DiskDaemon/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libDiskDaemon.la -libexec_PROGRAMS = diskd - -libDiskDaemon_la_SOURCES = \ - diomsg.h \ - DiskdAction.cc \ - DiskdAction.h \ - DiskdFile.cc \ - DiskdFile.h \ - DiskdIOStrategy.cc \ - DiskdIOStrategy.h \ - DiskDaemonDiskIOModule.cc \ - DiskDaemonDiskIOModule.h - -diskd_SOURCES = diskd.cc -nodist_diskd_SOURCES = time.cc -diskd_LDADD = \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -time.cc: $(top_srcdir)/src/time.cc - cp $(top_srcdir)/src/time.cc time.cc diff --git a/src/DiskIO/DiskIOModule.cc b/src/DiskIO/DiskIOModule.cc index e77bb034fd..d7feda49ae 100644 --- a/src/DiskIO/DiskIOModule.cc +++ b/src/DiskIO/DiskIOModule.cc @@ -10,24 +10,6 @@ #include "squid.h" #include "DiskIOModule.h" -#if HAVE_DISKIO_MODULE_AIO -#include "DiskIO/AIO/AIODiskIOModule.h" -#endif -#if HAVE_DISKIO_MODULE_BLOCKING -#include "DiskIO/Blocking/BlockingDiskIOModule.h" -#endif -#if HAVE_DISKIO_MODULE_DISKDAEMON -#include "DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h" -#endif -#if HAVE_DISKIO_MODULE_DISKTHREADS -#include "DiskIO/DiskThreads/DiskThreadsDiskIOModule.h" -#endif -#if HAVE_DISKIO_MODULE_IPCIO -#include "DiskIO/IpcIo/IpcIoDiskIOModule.h" -#endif -#if HAVE_DISKIO_MODULE_DISKTHREADS -#include "DiskIO/Mmapped/MmappedDiskIOModule.h" -#endif std::vector *DiskIOModule::_Modules = NULL; @@ -37,31 +19,14 @@ DiskIOModule::DiskIOModule() { /** We cannot call ModuleAdd(*this) * here as the virtual methods are not yet available. - * We leave that to SetupAllModules() later. + * We leave that to PokeAllModules() later. */ } void DiskIOModule::SetupAllModules() { -#if HAVE_DISKIO_MODULE_AIO - AIODiskIOModule::GetInstance(); -#endif -#if HAVE_DISKIO_MODULE_BLOCKING - BlockingDiskIOModule::GetInstance(); -#endif -#if HAVE_DISKIO_MODULE_DISKDAEMON - DiskDaemonDiskIOModule::GetInstance(); -#endif -#if HAVE_DISKIO_MODULE_DISKTHREADS - DiskThreadsDiskIOModule::GetInstance(); -#endif -#if HAVE_DISKIO_MODULE_IPCIO - IpcIoDiskIOModule::GetInstance(); -#endif -#if HAVE_DISKIO_MODULE_MMAPPED - MmappedDiskIOModule::GetInstance(); -#endif + DiskIOModule::PokeAllModules(); for (iterator i = GetModules().begin(); i != GetModules().end(); ++i) /* Call the FS to set up capabilities and initialize the FS driver */ diff --git a/src/DiskIO/DiskIOModule.h b/src/DiskIO/DiskIOModule.h index 5e2fff4d4a..5d73c7bcab 100644 --- a/src/DiskIO/DiskIOModule.h +++ b/src/DiskIO/DiskIOModule.h @@ -21,11 +21,13 @@ class DiskIOModule { public: - /** Poke all compiled modules for self-setup */ static void SetupAllModules(); static void ModuleAdd(DiskIOModule &); static void FreeAllModules(); + /** Poke all compiled modules for self-setup */ + static void PokeAllModules(); + static DiskIOModule *Find(char const *type); /** Find *any* usable disk module. This will look for the 'best' diff --git a/src/DiskIO/DiskThreads/Makefile.am b/src/DiskIO/DiskThreads/Makefile.am deleted file mode 100644 index 465de398b4..0000000000 --- a/src/DiskIO/DiskThreads/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libDiskThreads.la - -libDiskThreads_la_SOURCES = \ - async_io.cc \ - CommIO.cc \ - CommIO.h \ - DiskThreads.h \ - DiskThreadsDiskFile.cc \ - DiskThreadsDiskFile.h \ - DiskThreadsDiskIOModule.cc \ - DiskThreadsDiskIOModule.h \ - DiskThreadsIOStrategy.cc \ - DiskThreadsIOStrategy.h - -if ENABLE_WIN32_AIOPS -libDiskThreads_la_SOURCES += aiops_win32.cc -EXTRA_DIST = aiops.cc -else -libDiskThreads_la_SOURCES += aiops.cc -EXTRA_DIST = aiops_win32.cc -endif - diff --git a/src/DiskIO/IpcIo/Makefile.am b/src/DiskIO/IpcIo/Makefile.am deleted file mode 100644 index ead15d3bb2..0000000000 --- a/src/DiskIO/IpcIo/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libIpcIo.la - -libIpcIo_la_SOURCES = \ - IpcIoDiskIOModule.cc \ - IpcIoDiskIOModule.h \ - IpcIoFile.cc \ - IpcIoFile.h \ - IpcIoIOStrategy.cc \ - IpcIoIOStrategy.h diff --git a/src/DiskIO/Makefile.am b/src/DiskIO/Makefile.am deleted file mode 100644 index a8685422d7..0000000000 --- a/src/DiskIO/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -SUBDIRS= -DIST_SUBDIRS= AIO Blocking DiskDaemon DiskThreads IpcIo Mmapped - -noinst_LTLIBRARIES = libdiskio.la - -libdiskio_la_SOURCES = \ - DiskFile.h \ - DiskIOModule.cc \ - DiskIOModule.h \ - DiskIOStrategy.h \ - IORequestor.h \ - ReadRequest.cc \ - ReadRequest.h \ - WriteRequest.cc \ - WriteRequest.h - -# Custom DiskIO modules (if any): -libdiskio_la_LIBADD = $(DISK_LIBS) - -# Optional DiskIO modules: - -if ENABLE_DISKIO_AIO -SUBDIRS += AIO -libdiskio_la_LIBADD += AIO/libAIO.la $(AIOLIB) -endif - -if ENABLE_DISKIO_BLOCKING -SUBDIRS += Blocking -libdiskio_la_LIBADD += Blocking/libBlocking.la -endif - -if ENABLE_DISKIO_DISKDAEMON -SUBDIRS += DiskDaemon -libdiskio_la_LIBADD += DiskDaemon/libDiskDaemon.la -endif - -if ENABLE_DISKIO_DISKTHREADS -SUBDIRS += DiskThreads -libdiskio_la_LIBADD += DiskThreads/libDiskThreads.la $(LIBPTHREADS) -endif - -if ENABLE_DISKIO_IPCIO -SUBDIRS += IpcIo -libdiskio_la_LIBADD += IpcIo/libIpcIo.la -endif - -if ENABLE_DISKIO_MMAPPED -SUBDIRS += Mmapped -libdiskio_la_LIBADD += Mmapped/libMmapped.la -endif - diff --git a/src/DiskIO/Mmapped/Makefile.am b/src/DiskIO/Mmapped/Makefile.am deleted file mode 100644 index 34bcb8b6c0..0000000000 --- a/src/DiskIO/Mmapped/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Copyright (C) 1996-2015 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -include $(top_srcdir)/src/Common.am -include $(top_srcdir)/src/TestHeaders.am - -noinst_LTLIBRARIES = libMmapped.la - -libMmapped_la_SOURCES = \ - MmappedDiskIOModule.cc \ - MmappedDiskIOModule.h \ - MmappedFile.cc \ - MmappedFile.h \ - MmappedIOStrategy.cc \ - MmappedIOStrategy.h diff --git a/src/DiskIO/modules.sh b/src/DiskIO/modules.sh new file mode 100755 index 0000000000..d334fbc25c --- /dev/null +++ b/src/DiskIO/modules.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +## Copyright (C) 1996-2015 The Squid Software Foundation and contributors +## +## Squid software is distributed under GPLv2+ license and includes +## contributions from numerous individuals and organizations. +## Please see the COPYING and CONTRIBUTORS files for details. +## + +echo "/* automatically generated by $0 $*" +echo " * do not edit" +echo " */" +cat `dirname $0`/../../scripts/boilerplate.h +echo "#include \"squid.h\"" +echo "#include \"DiskIO/DiskIOModule.h\"" +for module in "$@"; do + echo "#include \"DiskIO/${module}/${module}DiskIOModule.h\"" +done +echo "" +echo "void DiskIOModule::PokeAllModules(void)" +echo "{" +for module in "$@"; do + echo " ${module}DiskIOModule::GetInstance();" +done +echo "}" diff --git a/src/Makefile.am b/src/Makefile.am index 4a312db113..1f6db6d1c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,8 +44,8 @@ LOADABLE_MODULES_SOURCES = \ LoadableModules.h \ LoadableModules.cc -SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl DiskIO -DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl DiskIO +SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl +DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl if ENABLE_AUTH SUBDIRS += auth @@ -175,9 +175,32 @@ else IPC_SOURCE = SquidIpc.h ipc.cc endif +AIO_WIN32_ALL_SOURCES = \ + DiskIO/AIO/aio_win32.cc \ + DiskIO/AIO/aio_win32.h +if ENABLE_WIN32_AIO +AIO_WIN32_SOURCES = $(AIO_WIN32_ALL_SOURCES) +else +AIO_WIN32_SOURCES = +endif + +if ENABLE_WIN32_AIOPS +AIOPS_SOURCE = DiskIO/DiskThreads/aiops_win32.cc \ + DiskIO/DiskThreads/CommIO.cc \ + DiskIO/DiskThreads/CommIO.h +else +AIOPS_SOURCE = DiskIO/DiskThreads/aiops.cc \ + DiskIO/DiskThreads/CommIO.cc \ + DiskIO/DiskThreads/CommIO.h +endif + +EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a \ + libMmapped.a libIpcIo.a +noinst_LIBRARIES = $(DISK_LIBS) noinst_LTLIBRARIES = libsquid.la EXTRA_PROGRAMS = \ + DiskIO/DiskDaemon/diskd \ unlinkd \ recv-announce \ tests/testUfs \ @@ -197,6 +220,7 @@ bin_PROGRAMS = libexec_PROGRAMS = \ + $(DISK_PROGRAMS) \ $(UNLINKD) cf_gen_SOURCES = cf_gen.cc @@ -211,6 +235,25 @@ AM_CPPFLAGS += -I$(top_builddir)/src ACL_REGISTRATION_SOURCES = AclRegs.cc AuthReg.cc +DISKIO_SOURCE = \ + DiskIO/DiskIOModule.cc \ + DiskIO/ReadRequest.cc \ + DiskIO/ReadRequest.h \ + DiskIO/WriteRequest.cc \ + DiskIO/WriteRequest.h \ + DiskIO/DiskFile.h \ + DiskIO/DiskIOStrategy.h \ + DiskIO/IORequestor.h \ + DiskIO/DiskIOModule.h \ + DiskIO/ReadRequest.h + +DISKIO_GEN_SOURCE = \ + DiskIO/DiskIOModules_gen.cc + +DiskIO/DiskIOModules_gen.cc: Makefile + $(SHELL) $(srcdir)/DiskIO/modules.sh $(DISK_MODULES) > DiskIO/DiskIOModules_gen.cc + + # common library for all the binaries and tests. This is kindof a catch all # and smaller libraries split from this are encouraged. Using lt convenience # libraries, dependencies should not be a problem either. @@ -284,6 +327,7 @@ squid_SOURCES = \ $(DELAY_POOL_SOURCE) \ disk.h \ disk.cc \ + $(DISKIO_SOURCE) \ dlink.h \ dlink.cc \ $(DNSSOURCE) \ @@ -505,6 +549,7 @@ squid_SOURCES = \ $(WINSVC_SOURCE) EXTRA_squid_SOURCES = \ + $(AIO_WIN32_ALL_SOURCES) \ $(all_AUTHMODULES) \ ConfigOption.h \ $(DELAY_POOL_ALL_SOURCE) \ @@ -543,6 +588,7 @@ BUILT_SOURCES = \ CLEANFILES += $(BUILT_SOURCES) nodist_squid_SOURCES = \ + $(DISKIO_GEN_SOURCE) \ $(BUILT_SOURCES) squid_LDADD = \ @@ -551,6 +597,7 @@ squid_LDADD = \ acl/libacls.la \ acl/libstate.la \ $(AUTH_LIBS) \ + $(DISK_LIBS) \ acl/libapi.la \ clients/libclients.la \ servers/libservers.la \ @@ -563,7 +610,6 @@ squid_LDADD = \ libsquid.la \ ip/libip.la \ fs/libfs.la \ - DiskIO/libdiskio.la \ $(SSL_LIBS) \ ipc/libipc.la \ mgr/libmgr.la \ @@ -577,6 +623,7 @@ squid_LDADD = \ $(XTRA_OBJS) \ $(DISK_LINKOBJS) \ $(REPL_OBJS) \ + $(DISK_OS_LIBS) \ $(NETTLELIB) \ $(CRYPTLIB) \ $(REGEXLIB) \ @@ -695,7 +742,7 @@ ufsdump_DEPENDENCIES = \ fs/libfs.la \ ipc/libipc.la \ mgr/libmgr.la \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ $(DISK_LINKOBJS) \ $(REPL_OBJS) @@ -735,6 +782,7 @@ EXTRA_DIST = \ cf_gen_defines \ cf.data.pre \ cf.data.depend \ + DiskIO/modules.sh \ mk-globals-c.pl \ mk-globals-c.awk \ mk-string-arrays.pl \ @@ -744,6 +792,78 @@ EXTRA_DIST = \ mib.txt \ mime.conf.default +libAIO_a_SOURCES = \ + $(AIO_WIN32_SOURCES) \ + DiskIO/AIO/async_io.h \ + DiskIO/AIO/AIODiskFile.cc \ + DiskIO/AIO/AIODiskFile.h \ + DiskIO/AIO/AIODiskIOStrategy.cc \ + DiskIO/AIO/AIODiskIOStrategy.h \ + DiskIO/AIO/AIODiskIOModule.cc \ + DiskIO/AIO/AIODiskIOModule.h + +libBlocking_a_SOURCES = \ + DiskIO/Blocking/BlockingFile.cc \ + DiskIO/Blocking/BlockingFile.h \ + DiskIO/Blocking/BlockingIOStrategy.cc \ + DiskIO/Blocking/BlockingIOStrategy.h \ + DiskIO/Blocking/BlockingDiskIOModule.cc \ + DiskIO/Blocking/BlockingDiskIOModule.h + +libMmapped_a_SOURCES = \ + DiskIO/Mmapped/MmappedFile.cc \ + DiskIO/Mmapped/MmappedFile.h \ + DiskIO/Mmapped/MmappedIOStrategy.cc \ + DiskIO/Mmapped/MmappedIOStrategy.h \ + DiskIO/Mmapped/MmappedDiskIOModule.cc \ + DiskIO/Mmapped/MmappedDiskIOModule.h + +libIpcIo_a_SOURCES = \ + DiskIO/IpcIo/IpcIoFile.cc \ + DiskIO/IpcIo/IpcIoFile.h \ + DiskIO/IpcIo/IpcIoIOStrategy.cc \ + DiskIO/IpcIo/IpcIoIOStrategy.h \ + DiskIO/IpcIo/IpcIoDiskIOModule.cc \ + DiskIO/IpcIo/IpcIoDiskIOModule.h + +libDiskDaemon_a_SOURCES = \ + DiskIO/DiskDaemon/DiskdFile.cc \ + DiskIO/DiskDaemon/DiskdFile.h \ + DiskIO/DiskDaemon/DiskdIOStrategy.cc \ + DiskIO/DiskDaemon/DiskdIOStrategy.h \ + DiskIO/DiskDaemon/diomsg.h \ + DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc \ + DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h \ + DiskIO/DiskDaemon/DiskdAction.cc \ + DiskIO/DiskDaemon/DiskdAction.h + +libDiskThreads_a_SOURCES = \ + $(AIOPS_SOURCE) \ + DiskIO/DiskThreads/async_io.cc \ + DiskIO/DiskThreads/DiskThreads.h \ + DiskIO/DiskThreads/DiskThreadsDiskFile.cc \ + DiskIO/DiskThreads/DiskThreadsDiskFile.h \ + DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc \ + DiskIO/DiskThreads/DiskThreadsDiskIOModule.h \ + DiskIO/DiskThreads/DiskThreadsIOStrategy.cc \ + DiskIO/DiskThreads/DiskThreadsIOStrategy.h + +EXTRA_libDiskThreads_a_SOURCES = \ + DiskIO/DiskThreads/aiops.cc \ + DiskIO/DiskThreads/aiops_win32.cc \ + DiskIO/DiskThreads/CommIO.cc \ + DiskIO/DiskThreads/CommIO.h + +DiskIO_DiskDaemon_diskd_SOURCES = DiskIO/DiskDaemon/diskd.cc +nodist_DiskIO_DiskDaemon_diskd_SOURCES = time.cc +DiskIO_DiskDaemon_diskd_LDADD = \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + + DEFAULT_HTTP_PORT = 3128 DEFAULT_ICP_PORT = 3130 DEFAULT_PREFIX = $(prefix) @@ -886,6 +1006,7 @@ uninstall-local: squid.conf.default @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CONFIG_FILE) squid.conf.default CLEANFILES += cf.data squid.conf.default squid.conf.documented \ + DiskIO/DiskIOModules_gen.cc \ test_tools.cc *.a test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc @@ -1191,6 +1312,7 @@ tests_testACLMaxUserIP_LDADD= \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ + $(DISK_OS_LIBS) \ $(NETTLELIB) \ $(REGEXLIB) \ $(SQUID_CPPUNIT_LIBS) \ @@ -1268,6 +1390,7 @@ tests_testCacheManager_SOURCES = \ CpuAffinitySet.cc \ CpuAffinitySet.h \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ disk.h \ disk.cc \ dlink.h \ @@ -1416,7 +1539,8 @@ tests_testCacheManager_SOURCES = \ wordlist.h \ wordlist.cc nodist_tests_testCacheManager_SOURCES = \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + $(DISKIO_GEN_SOURCE) # comm.cc only requires comm/libcomm.la until fdc_table is dead. tests_testCacheManager_LDADD = \ libsquid.la \ @@ -1440,7 +1564,8 @@ tests_testCacheManager_LDADD = \ log/liblog.la \ format/libformat.la \ $(REPL_OBJS) \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ $(ADAPTATION_LIBS) \ $(ESI_LIBS) \ $(SSL_LIBS) \ @@ -1475,6 +1600,7 @@ tests_testDiskIO_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ disk.h \ disk.cc \ tests/stub_ETag.cc \ @@ -1601,6 +1727,7 @@ tests_testDiskIO_SOURCES = \ tests/stub_tools.cc nodist_tests_testDiskIO_SOURCES= \ $(TESTSOURCES) \ + $(DISKIO_GEN_SOURCE) \ SquidMath.cc \ SquidMath.h \ swap_log_op.cc @@ -1618,7 +1745,8 @@ tests_testDiskIO_LDADD = \ fs/libfs.la \ ipc/libipc.la \ $(REPL_OBJS) \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ acl/libapi.la \ anyp/libanyp.la \ mgr/libmgr.la \ @@ -1639,7 +1767,7 @@ tests_testDiskIO_LDADD = \ tests_testDiskIO_LDFLAGS = $(LIBADD_DL) tests_testDiskIO_DEPENDENCIES = \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ $(SWAP_TEST_DS) \ $(SQUID_CPPUNIT_LA) @@ -1694,6 +1822,7 @@ tests_testEvent_SOURCES = \ CpuAffinitySet.h \ debug.cc \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ disk.h \ disk.cc \ dlink.h \ @@ -1856,7 +1985,8 @@ tests_testEvent_SOURCES = \ wordlist.h \ wordlist.cc nodist_tests_testEvent_SOURCES = \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + $(DISKIO_GEN_SOURCE) tests_testEvent_LDADD = \ libsquid.la \ clients/libclients.la \ @@ -1885,7 +2015,8 @@ tests_testEvent_LDADD = \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ ipc/libipc.la \ mgr/libmgr.la \ $(SNMP_LIBS) \ @@ -1937,6 +2068,7 @@ tests_testEventLoop_SOURCES = \ CpuAffinitySet.h \ debug.cc \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ disk.h \ disk.cc \ dlink.h \ @@ -2098,7 +2230,8 @@ tests_testEventLoop_SOURCES = \ wordlist.h \ wordlist.cc nodist_tests_testEventLoop_SOURCES = \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + $(DISKIO_GEN_SOURCE) tests_testEventLoop_LDADD = \ libsquid.la \ clients/libclients.la \ @@ -2127,7 +2260,8 @@ tests_testEventLoop_LDADD = \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ ipc/libipc.la \ mgr/libmgr.la \ $(SNMP_LIBS) \ @@ -2178,6 +2312,7 @@ tests_test_http_range_SOURCES = \ CpuAffinitySet.h \ debug.cc \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ disk.h \ disk.cc \ dlink.h \ @@ -2335,7 +2470,8 @@ tests_test_http_range_SOURCES = \ wordlist.h \ wordlist.cc nodist_tests_test_http_range_SOURCES = \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + $(DISKIO_GEN_SOURCE) tests_test_http_range_LDADD = \ libsquid.la \ clients/libclients.la \ @@ -2357,7 +2493,8 @@ tests_test_http_range_LDADD = \ log/liblog.la \ format/libformat.la \ $(REPL_OBJS) \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ $(ADAPTATION_LIBS) \ $(ESI_LIBS) \ $(SSL_LIBS) \ @@ -2657,6 +2794,7 @@ tests_testHttpRequest_LDADD = \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ + $(DISK_OS_LIBS) \ $(NETTLELIB) \ $(REGEXLIB) \ $(SQUID_CPPUNIT_LIBS) \ @@ -2885,6 +3023,7 @@ tests_testString_DEPENDENCIES = \ SWAP_TEST_DS =\ repl_modules.o \ + $(DISK_LIBS) \ ident/libident.la \ acl/libacls.la \ acl/libstate.la \ @@ -2893,7 +3032,6 @@ SWAP_TEST_DS =\ libsquid.la \ ip/libip.la \ fs/libfs.la \ - DiskIO/libdiskio.la \ ipc/libipc.la \ mgr/libmgr.la \ $(REPL_OBJS) \ @@ -3030,10 +3168,12 @@ tests_testUfs_SOURCES = \ tests/testStoreSupport.h \ time.cc \ wordlist.h \ - wordlist.cc + wordlist.cc \ + $(DISKIO_SOURCE) nodist_tests_testUfs_SOURCES = \ $(TESTSOURCES) \ + $(DISKIO_GEN_SOURCE) \ SquidMath.cc \ SquidMath.h \ swap_log_op.cc @@ -3051,7 +3191,8 @@ tests_testUfs_LDADD = \ mgr/libmgr.la \ $(REPL_OBJS) \ acl/libacls.la \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ acl/libapi.la \ $(SSL_LIBS) \ ipc/libipc.la \ @@ -3211,8 +3352,10 @@ tests_testRock_SOURCES = \ wordlist.h \ wordlist.cc \ $(DELAY_POOL_SOURCE) \ + $(DISKIO_SOURCE) \ $(UNLINKDSOURCE) nodist_tests_testRock_SOURCES = \ + $(DISKIO_GEN_SOURCE) \ swap_log_op.cc \ SquidMath.cc \ SquidMath.h \ @@ -3226,7 +3369,8 @@ tests_testRock_LDADD = \ fs/libfs.la \ $(COMMON_LIBS) \ $(REPL_OBJS) \ - DiskIO/libdiskio.la \ + $(DISK_LIBS) \ + $(DISK_OS_LIBS) \ acl/libacls.la \ acl/libapi.la \ acl/libstate.la \ @@ -3474,6 +3618,7 @@ tests_testURL_LDADD = \ icmp/libicmp.la icmp/libicmp-core.la \ comm/libcomm.la \ log/liblog.la \ + $(DISK_OS_LIBS) \ format/libformat.la \ $(REGEXLIB) \ $(REPL_OBJS) \ diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc index 793499c694..6dd0ab74d1 100644 --- a/src/ipc/Strand.cc +++ b/src/ipc/Strand.cc @@ -25,7 +25,7 @@ #include "mgr/Request.h" #include "mgr/Response.h" #include "SwapDir.h" /* XXX: scope boundary violation */ -#if HAVE_DISKIO_MODULE_IPCIO +#if USE_DISKIO_IPCIO #include "DiskIO/IpcIo/IpcIoFile.h" /* XXX: scope boundary violation */ #endif #if SQUID_SNMP @@ -73,7 +73,7 @@ void Ipc::Strand::receive(const TypedMsgHdr &message) SharedListenJoined(SharedListenResponse(message)); break; -#if HAVE_DISKIO_MODULE_IPCIO +#if USE_DISKIO_IPCIO case mtStrandSearchResponse: IpcIoFile::HandleOpenResponse(StrandSearchResponse(message)); break; @@ -81,7 +81,7 @@ void Ipc::Strand::receive(const TypedMsgHdr &message) case mtIpcIoNotification: IpcIoFile::HandleNotification(message); break; -#endif /* HAVE_DISKIO_MODULE_IPCIO */ +#endif /* USE_DISKIO_IPCIO */ case mtCacheMgrRequest: { const Mgr::Request req(message); diff --git a/src/tests/stub_DiskIOModule.cc b/src/tests/stub_DiskIOModule.cc index 4787fc9e51..d88132efa6 100644 --- a/src/tests/stub_DiskIOModule.cc +++ b/src/tests/stub_DiskIOModule.cc @@ -18,6 +18,7 @@ void DiskIOModule::SetupAllModules() STUB void DiskIOModule::ModuleAdd(DiskIOModule &) STUB void DiskIOModule::FreeAllModules() STUB +void DiskIOModule::PokeAllModules() STUB DiskIOModule *DiskIOModule::Find(char const *) STUB_RETVAL(NULL) DiskIOModule *DiskIOModule::FindDefault() STUB_RETVAL(NULL) std::vector const &DiskIOModule::Modules() STUB_RETSTATREF(std::vector)